I have two Ubuntu servers. Entering the below on server Server A works fine:
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> from requests.packages.urllib3.poolmanager import PoolManager
Server B however,
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> from requests.packages.urllib3.poolmanager import PoolManager
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named packages.urllib3.poolmanager
Both have the same version:
Name: requests
Version: 2.7.0
Location: /usr/local/lib/python2.7/dist-packages
Requires:
What’s going on here?
Here is Server B's paths:
/usr/local/lib/python2.7/dist-packages/greenlet-0.4.5-py2.7-linux-x86_64.egg
/usr/local/lib/python2.7/dist-packages/gevent-1.0.1-py2.7-linux-x86_64.egg
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
Server B has the file located here, so it should find it:
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3