Intel® Distribution for Python*
Engage in discussions with community peers related to Python* applications and core computational packages.
423 Discussions

Managing packages with other python installations

Narayanan_S_Intel
719 Views

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
Christophe_H_Intel2
719 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
Narayanan_S_Intel
719 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
Reply