0

我运行了以下命令:

sudo pip install dotcloud

哪个向我报告它安装正确,但是当我尝试运行时dotcloud setup,它没有找到命令

所以我试图卸载它

sudo pip 卸载点云

并使用上面的命令重新安装

但是,终端仍然找不到 cli

我需要更改我的 $PATH 变量吗?它目前看起来像这样:

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

我听说 pip install 应该将命令放在 /usr/local/bin 中,但是当我在那里执行 ls 时,它不在列表中。

4

1 回答 1

1

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:

于 2013-08-01T15:57:49.143 回答