我做了pip install -U easyinstall,然后pip install -U pip来升级我的pip.但是,在尝试使用pip时,我现在收到此错误:
root@d8fb98fc3a66:/# which pip
/usr/local/bin/pip
root@d8fb98fc3a66:/# pip
bash: /usr/bin/pip: No such file or directory
Run Code Online (Sandbox Code Playgroud)
这是在docker镜像中的ubuntu 12.04上.
出于某种原因,当我运行`brew link python时,它没有符号链接.我收到了以下错误,我做了它告诉我要做的事情,但它不起作用.我已经尝试过做它告诉我要做的事情,但也许我没有把formula_name放在正确的位置.此外,当我做'哪个python'它没有指向Homebrew python,我也需要帮助修复它.
Linking /usr/local/Cellar/python/2.7.3...Warning: Could not link python.
Unlinking....
Error: Could not symlink file: /usr/local/Cellar/python/2.7.3/bin/smtpd.py
Target /usr/local/bin/smtpd2.py already exists. You may need to delete it.
To force the link and delete this file, do:
brew link --overwrite formula_name
Run Code Online (Sandbox Code Playgroud) macOS 10.12
最佳答案说要做:
brew link --overwrite python
产生:
Warning: Already linked: /usr/local/Cellar/python/3.6.5
To relink: brew unlink python && brew link python
Run Code Online (Sandbox Code Playgroud)
我很确定我需要让自制软件切换到 2.7 而不是使用版本 3。我愿意
brew unlink python && brew link python
并得到:
Unlinking /usr/local/Cellar/python/3.6.5... 25 symlinks removed
Linking /usr/local/Cellar/python/3.6.5... 25 symlinks created
Run Code Online (Sandbox Code Playgroud)
有没有办法告诉它链接到特定版本?/usr/local/Cellar/python/
包含:2.7.13 2.7.14 2.7.14_3 3.6.3 3.6.5
如何让我的系统始终使用2.7.14_3
?
/usr/local/opt/python/bin
包含python3
、python3-config
和 3.6 版本。我怎样才能在这里得到 2.7 并删除 3 和 3.6?
也which python
返回/usr/bin/python
。当我输入时,python -V …
您能否介绍一下与OS X一起分发的Python解释器与可以通过MacPorts安装的Python解释器之间的交互?
在安装networkx
和matplotlib
我有相互作用的困难/usr/bin/python
和/opt/local/bin/python2.7
.(后者本身就是一个软指针/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
)
我怎样才能确定我在任何时候使用哪些Python,pip和Python库?
更重要的matplotlib
是,Lion 似乎无法安装.它失败了Requires numpy 1.6 or later to build. (Found 1.5.1)
.如果我通过运行升级sudo pip install --upgrade numpy
,它没有帮助.随后尝试安装matplotlib
(sudo /usr/local/bin/pip install matplotlib
)仍然失败并显示相同的(Requires numpy 1.6...
)消息.我该如何安装matplotlib?
python ×4
macos ×2
python-2.7 ×2
bash ×1
easy-install ×1
homebrew ×1
matplotlib ×1
numpy ×1
pip ×1
python-3.x ×1
symlink ×1
youtube-dl ×1