Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Bonjour,

I've just installed pip by doing

sudo apt-get install python-pip

But I am facing a problem... When I want to download a module (pygame for exemple) it fails by throwing these errors :

Traceback (most recent call last):
  File "/usr/local/bin/pip2", line 9, in <module>
    load_entry_point('pip==1.5.4', 'console_scripts', 'pip2')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 343, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2309, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2015, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.4-py2.7.egg/pip/__init__.py", line 11, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.4-py2.7.egg/pip/vcs/mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.4-py2.7.egg/pip/download.py", line 2, in <module>
    import email.utils
  File "/usr/lib/python2.7/email/utils.py", line 32, in <module>
    from email._parseaddr import quote
  File "/usr/lib/python2.7/email/_parseaddr.py", line 16, in <module>
    import time, calendar
  File "/usr/lib/python2.7/calendar.py", line 10, in <module>
    import locale as _locale
  File "/usr/lib/python2.7/locale.py", line 15, in <module>
    import encodings
ImportError: No module named encodings

I don't unerstand what can I do.

Thank you!

share|improve this question
    
Please give details or link to instructions for how you installed Python, including version, download site, environmental setup, etc... –  Flak DiNenno Mar 29 at 9:46

1 Answer 1

Which version of python did you install? Your paths might be messed up and it may have installed PIP for the wrong version of python you're using if you have multiple versions installed.

Similar Problem

share|improve this answer
    
Hi grant, thank you for your answer. I set up my python like presented in the link below but nothing has changed. My pip version is the 1.4.1-2 and I am running on Linux mint 16. I don't know what goes wrong but when I try to execute, any unknown command in the terminal it thows me ImportError: No module named site it's very odd... –  Floufen Mar 3 at 9:54
    
@Floufen what "link below" are you speaking of when you said "Hi grant, thank you for your answer. I set up my python like presented in the link below but nothing has changed" in the above comment? You are almost definitely the victim of a path problem –  Flak DiNenno Mar 26 at 17:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.