简体   繁体   中英

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

apt-get install python-pip

However when I try installing any package using pip I get the following error

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. To reproduce the problem:

  1. Upgrade python to 2.7 from building the source code and installed it in /opt/python.

  2. wget bootstrap.pypa.io/get-pip.py and run get-pip.py . The installtion should be successful.

  3. run pip and the errors occur. ImportError: No module named pip.log .

The steps to solve the problem:

  1. ls -l /usr/bin/pip find the old pip installation location.
  2. rm -rf pip remove the old pip installation.
  3. reinstall the pip with get-pip.py
  4. relink the /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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM