0

I removed some "wrong" mimetypes files. How can I resolve this error? Reinstalling electrum and pip hasn't solved this.

$ electrum
Error: No module named mimetypes. Try 'sudo pip install <module-name>'

$ sudo pip install mimetypes
Traceback (most recent call last):
 File "/usr/bin/pip", line 9, in <module>
    load_entry_point(pip==1.5.6', console_scripts', pip')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "/usr/lib/python2.7/dist-packages/pip/download.py, line 5, in <module>
    import mimetypes
ImportError: No module named mimetypes
4
  • Can you be more specific about what files you removed? FYI /usr/lib/python2.7/mimetypes.py is provided by the libpython2.7-stdlib package Jun 13, 2017 at 11:22
  • 1
    what's with the debian tag?
    – Zanna
    Jun 13, 2017 at 11:44
  • I dont remember, but /usr/lib/python2.7/mimetypes.py is missing. If i reinstall libphyton2.7 it is can solve this error?
    – Henricc
    Jun 13, 2017 at 12:19
  • Problem solved! I made missing mimetypes.py from github, after (maybie not necessary) made sudo apt-get install --reinstall python2.7
    – Henricc
    Jun 13, 2017 at 18:32

1 Answer 1

0

Problem solved! I made missing mimetypes.py from github, after (maybie not necessary) made sudo apt-get install --reinstall python2.7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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