Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
61 Views

Managing packages with other python installations

I have python2.7 already installed on my machine and then installed Intel Python at /opt/intel/python/2.7.20150803_184913/ on my Linux machine. Now I want to install the rpy2 package for the Intel python version using pip, but I am not able to.

$ which pip

/opt/intel/python/2.7.20150803_184913/bin/pip

$ pip install rpy2

Requirement already satisfied (use --upgrade to upgrade): rpy2 in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/dist-packages (from rpy2)
Requirement already satisfied (use --upgrade to upgrade): singledispatch in /usr/local/lib/python2.7/dist-packages (from rpy2)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning

pip seems to think rpy2 is installed as it was installed for the system's python, but it is not for Intel's Python distribution. Any ideas on how to resolve it?

Thanks

0 Kudos
2 Replies
Highlighted
61 Views

Hello,

We are unable to reproduce the issue.  Do you have the PYTHONPATH environment variable pointing to /usr/lib/python2.7/dist-packages by chance? If so, try unsetting PYTHONPATH and running pip install again.

Chris

0 Kudos
Highlighted
61 Views

I figured out what the problem was. I had to use "sudo pip install " as the user did not have write permission to /opt/intel/python/ and passed the environment through "sudo -E pip install ". This copies the PYTHONPATH and PATH variables over, but somehow the su user was seeing only the system python path. The simple fix was to use "sudo -E /opt/intel/python/2.7.20150803_184913/bin/pip install ".

 

0 Kudos