每当我pip使用任何参数或标志运行时,我都会遇到问题。我试过这样做,apt-get install --reinstall python-pip但它没有帮助,我不知道如何解决这个问题
Ubuntu 版本
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
Run Code Online (Sandbox Code Playgroud)
Python的版本
$ python --version
Python 2.7.6
Run Code Online (Sandbox Code Playgroud)
点子版本
$ dpkg -l | grep pip
ii python-pip 1.5.4-1 all alternative Python package installer
Run Code Online (Sandbox Code Playgroud)
错误,无论我尝试什么参数或标志,我都会得到完全相同的错误。
$ pip
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, …Run Code Online (Sandbox Code Playgroud) 我在 Ubuntu 15.04 上遇到了一个奇怪的 pip 问题。当我尝试使用“-t”选项安装任何东西以将其放入特定目录时,它失败并显示以下错误:
error: can't combine user with prefix, exec_prefix/home, or install_(plat)base
例如,pip install -t <directory> <package>失败并出现此错误。
我的 pip 是 1.5.6 版本,我的 Python 版本是 2.7。
我已经在我的 14.10 系统上运行了完全相同的命令,没有出现任何问题,所以我只能得出结论,这是一个 15.04 特有的问题。
我正在尝试使用 pip 8.1.1 在 Ubuntu 16.04 4.4.0 上升级 paramiko:
pip install -U paramiko
...
Installing collected packages: idna, setuptools, enum34, pycparser, cffi, cryptography, paramiko
Found existing installation: idna 2.0
Not uninstalling idna at /usr/lib/python2.7/dist-packages, outside environment /usr
Found existing installation: setuptools 20.7.0
Not uninstalling setuptools at /usr/lib/python2.7/dist-packages, outside environment /usr
Found existing installation: enum34 1.1.2
Not uninstalling enum34 at /usr/lib/python2.7/dist-packages, outside environment /usr
Found existing installation: cryptography 1.2.3
Not uninstalling cryptography at /usr/lib/python2.7/dist-packages, outside environment /usr
Found existing installation: paramiko …Run Code Online (Sandbox Code Playgroud)