Pregunta

I ran the following commands:

sudo pip install dotcloud

Which reported back to me that it installed correcly, but when I tried to run dotcloud setup, it didn't find the command

So I tried to uninstall it

sudo pip uninstall dotcloud

and reinstall using the command above

but still, terminal doesn't find the cli

do I need to change my $PATH variable? It currently looks like this:

$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/go/bin

I've heard that pip install should put the command in /usr/local/bin but when I do ls in there, it isn't in the list.

¿Fue útil?

Solución

It looks like you're global python installation is broken in some way. Most likely, there's a problem with where pip is installing your packages. You can try to diagnose this problem using pip freeze to tell you what's installed and which python to see where your default python is located.


I'd highly recommend using virtualenv/virtualenvwapper instead of the global environment for projects. These tools allow you to manage dependencies of projects much easier than trying to manage them from within your global python installation.

Since you already have pip, you can pip install the tools to your global environment (only need to do this once):

sudo pip install virtualenv

sudo pip install virtualenwrapper

Now you make make a virtual environments for each project that you workon. To make you're first project do:

mkvirtualenv myproject

Virtualenvwrapper should "load" that environment for you.

(myproject) $

Now, install your packages with pip:

pip install dotcloud

Check to see the list of packages:

pip freeze

References:

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top