Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 18761  / 3 Years ago, wed, june 23, 2021, 2:52:00

I'm currently using Ubuntu 12.04 with pip version 1.0 and python version 2.7.



pip --version
pip 1.0 from /usr/lib/python2.7/dist-packages (python 2.7)


Unfortunately, since trying to upgrade one of the pip packages, I'm unable to install anything using pip. I'm getting the following error messages:



vince@hal:~$ sudo pip install glances
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 215, in run
import setuptools
ImportError: No module named setuptools

Storing complete log in /home/vince/.pip/pip.log
vince@hal:~$ sudo pip install flexget
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 215, in run
import setuptools
ImportError: No module named setuptools

Storing complete log in /home/vince/.pip/pip.log
vince@hal:~$


Anyone got any ideas?


More From » python

 Answers
0

Okay, I managed to get it working - hopefully this will help others in the future:



Found the following ticket:



http://flexget.com/ticket/21161



From here I used the following command:




This was because the upgrade somehow managed to remove the setuptools
package from my python environment. Running the command below fixed
setuptools and allowed me to use pip to uninstall and reinstall
flexget.



curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py |
sudo python




Successfully installed flexget



Cleaning up...



vince@hal:~$ flexget -V

1.2.125


You are on the latest release.


[#25874] Wednesday, June 23, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ntlesslving

Total Points: 123
Total Questions: 109
Total Answers: 113

Location: South Korea
Member since Fri, Sep 11, 2020
4 Years ago
;