Skip to content
Advertisement

Cannot import any modules (installed used pip) in python 2.7.14

I downloaded the source code of python 2.7.14 and built it and installed it on linux ( Red Hat 4.8.5-16 ). I have earlier installed python-magic and requests libraries. Now when I try to import modules installed using pip, I get this:

JavaScript

while similar thing works perfectly fine in python 2.7.5 (default with the RHEL system)

JavaScript

Am I missing any configuration step here?

Advertisement

Answer

The modules installed via pip are only available to the standard python version. You need to install your desired packages for the non-standard python versions as well (see also Installing Python Modules)

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement