4

AttributeError: 'module' object has no attribute 'openssl_md_meth_names'

I keep receiving this error when trying to install Flask or any library through pip

I have viewed other attributeerror posts and they have helped but this openssl module has little insight. I did try to install Python 2.7.9

What steps should I take to remove python and preform a fresh install? I executed sudo apt-get remove python earlier and that was a big mistake. I have since recovered from that.

2 Answers 2

5

I would try:

sudo apt-get install --reinstall python2.7

I would also then use python2.7 instead of python in the command line to be sure I'm using the correct executable.

What I would do in your case to avoid future headaches is install python via anaconda. Tutorial here: http://docs.continuum.io/anaconda/ With this tool you install python in a different place than the system python and can use different versions and different packages for different projects without breaking your system (although it does have a learning curve). It also has good support for libraries like numpy and the like who can get grumpy when compiled and you can use pip with it.

Sign up to request clarification or add additional context in comments.

Comments

1

If you use apt-get to install Python, then you get whatever version of Python is supported by your Linux distribution.

If you are using Debian, you can get 2.7.9 from the "unstable" repos (code-named "sid"). You don't necessarily have to upgrade your whole system to "unstable"; read about "pinning" packages. Pinning is tricky and I avoid it.

You also have the option of simply downloading the Python source code and building it on your system. Then you would run Python 2.7.9 out of /usr/local/bin and you would still have the stable Python supported by your system.

If you do wind up installing your own build of Python, you might want to look into VirtualEnv. http://simononsoftware.com/virtualenv-tutorial-part-2/

1 Comment

even when I am inside a virtualenv I receive the error: ` File "/usr/lib/python2.7/hashlib.py", line 138, in <module> _hashlib.openssl_md_meth_names) AttributeError: 'module' object has no attribute 'openssl_md_meth_name`

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.