[英]ImportError: No module named pip.log -- in installation using pip
I am working on Ubuntu 10.10 and I have installed pip using the following command我正在使用 Ubuntu 10.10,我已经使用以下命令安装了 pip
apt-get install python-pip
However when I try installing any package using pip I get the following error但是,当我尝试使用 pip 安装任何 package 时,出现以下错误
ImportError: No module named pip.log
What has possibly gone wrong here?hon这里可能出了什么问题?亲爱的
I have the same problem on debian squeezy(6.0) which default installation is python 2.6.我在 debian squeezy(6.0) 上遇到了同样的问题,默认安装是 python 2.6。 To reproduce the problem:
要重现问题:
Upgrade python to 2.7 from building the source code and installed it in /opt/python.将 python 从构建源代码升级到 2.7,并将其安装在 /opt/python 中。
wget bootstrap.pypa.io/get-pip.py
and run get-pip.py
. wget bootstrap.pypa.io/get-pip.py
并运行get-pip.py
。 The installtion should be successful.安装应该会成功。
run pip
and the errors occur.运行
pip
并出现错误。 ImportError: No module named pip.log
. ImportError: No module named pip.log
。
The steps to solve the problem:解决问题的步骤:
ls -l /usr/bin/pip
find the old pip installation location. ls -l /usr/bin/pip
找到旧的 pip 安装位置。rm -rf pip
remove the old pip installation. rm -rf pip
删除旧的 pip 安装。pip
with get-pip.py
get-pip.py
重新安装pip
/usr/bin/pip
to the new pip installation location which in my computer is ln -s /opt/python/lib/python2.7/site-packages/pip/__init__.py pip
/usr/bin/pip
重新链接到新的 pip 安装位置,在我的电脑中是ln -s /opt/python/lib/python2.7/site-packages/pip/__init__.py pip
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.