我在OS X 10.8.3上通过自制软件安装了python 2.7.2。我通过pip install virtualenv
安装了virtualenv。
发出命令virtualenv venv
时,我收到此错误:-bash: virtualenv:command not found.
供参考:
$ pip install virtualenv
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /usr/local/lib/python2.7/site-packages
Cleaning up...
$ ls /usr/local/bin/virtualenv
ls: /usr/local/bin/virtualenv: No such file or directory
有什么想法吗?
答案 0 :(得分:0)
您需要将/ usr / local / bin放入PATH。
export PATH = / usr / local / bin:$ PATH
答案 1 :(得分:0)
除了Michael Soulier的回答,你可以手动添加路径(出于某种原因,这对我来说总是更好)。
open ~/.bash_profile
粘贴:
# Making usr/local the default lookup
PATH=/usr/local/bin:$PATH
export PATH