在Mac OSX上找不到pip安装的python模块的可执行文件

xuanyue

我使用homebrew安装python,并使用pip随附在Mac OS EL Captian上安装python软件包。

当安装python模块时,用python安装的pip可以正常工作,并且我将其导入python shell中没有问题(我已经测试了请求和beautifulsoup4并且可以找到它们)。但是我找不到某些python模块的可执行文件。

例如,在这个问题中,我询问了关于python sphinx doc generator命令not found的问题根据文档,sphinx-build在安装pip之后,我应该有一个可执行命令。但是正如您在该问题中看到的那样,找不到该命令。

我进一步尝试了另一种饼干点安装顺利运行,没有任何问题。但是仍然找不到二进制可执行文件。如你看到的:

JINXUANs-MacBook-Pro:~ jinxuanwu$ pip install cookiecutter
Requirement already satisfied (use --upgrade to upgrade): cookiecutter in /usr/local/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): binaryornot>=0.2.0 in /usr/local/lib/python2.7/site-packages (from cookiecutter)
Requirement already satisfied (use --upgrade to upgrade): whichcraft>=0.1.1 in /usr/local/lib/python2.7/site-packages (from cookiecutter)
Requirement already satisfied (use --upgrade to upgrade): future>=0.15.2 in /Library/Python/2.7/site-packages (from cookiecutter)
Requirement already satisfied (use --upgrade to upgrade): ruamel.yaml>=0.10.12 in /usr/local/lib/python2.7/site-packages (from cookiecutter)
Requirement already satisfied (use --upgrade to upgrade): jinja2>=2.7 in /Library/Python/2.7/site-packages (from cookiecutter)
Requirement already satisfied (use --upgrade to upgrade): click>=5.0 in /usr/local/lib/python2.7/site-packages (from cookiecutter)
Requirement already satisfied (use --upgrade to upgrade): chardet>=2.0.0 in /usr/local/lib/python2.7/site-packages (from binaryornot>=0.2.0->cookiecutter)
Requirement already satisfied (use --upgrade to upgrade): ruamel.ordereddict in /usr/local/lib/python2.7/site-packages (from ruamel.yaml>=0.10.12->cookiecutter)
Requirement already satisfied (use --upgrade to upgrade): ruamel.base>=1.0.0 in /usr/local/lib/python2.7/site-packages (from ruamel.yaml>=0.10.12->cookiecutter)
Requirement already satisfied (use --upgrade to upgrade): MarkupSafe in /Library/Python/2.7/site-packages (from jinja2>=2.7->cookiecutter)
JINXUANs-MacBook-Pro:~ jinxuanwu$ cookiecutter
-bash: cookiecutter: command not found
JINXUANs-MacBook-Pro:~ jinxuanwu$ 

我也尝试使用pip install virtualenv仍然面对命令未找到问题。

我的Python版本是2.7.11,pip是8.0.2,Python随附。

不可思议的

使用pip show -f cookiecutter表明它安装了一切的位置(这是我从这个发现由PIP安装在如何列出文件答案

当我运行它时,它表明它已安装在中../../../../usr/local/bin/cookiecutter查看Location上面信息(/Library/Python/2.7/site-packages以我为例),我可以看到字符串..用来获取根目录。

在我的Mac上,它已将其安装在中/usr/local/bin因此,我可以通过更新环境路径来访问它:

export PATH=$PATH:/usr/local/bin

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

Related 相关文章

热门标签

归档