3

I installed a few libraries from github and these added the .egg file to the sys.path. For example, after installing requests the following is in the path: C:\\Python27\\lib\\site-packages\\requests-2.11.1-py2.7.egg

After installing requests_oauthlib, I ran some code importing that library and received the following error.

ImportError: No module named requests_oauthlib

Calling import sys; print sys.path gives the following output:

['C:/Users/Matt/Downloads/Project Folder', 'C:\\Python27\\Lib\\idlelib', 'C:\\Python27\\lib\\site-packages\\indicoio-0.16.1-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\mock-2.0.0-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\requests-2.11.1-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\pbr-1.10.0-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\funcsigs-1.0.2-py2.7.egg', 'c:\\users\\matt\\indicoio-python\\.eggs\\pillow-3.3.1-py2.7-win32.egg', 'c:\\users\\matt\\indicoio-python\\.eggs\\six-1.10.0-py2.7.egg', 'C:\\Python27', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27\\lib\\site-packages']

The egg file for requests_oauthlib is not included in this sys.path. Going to the site-packages directory, I can see that installing the requests_oauthlib put a egg file there. Its path is C:\Python27\Lib\site-packages\requests_oauthlib-0.6.2-py2.7.egg. How can I permanently add this to the sys.path? I do not want to have to add this to the path each time I open python.

If relevant, I'm using Windows.

Matt
  • 1,792
  • 5
  • 21
  • 33
  • What did you use to install these packages? Did you mix using `pip`, `easy_install` and `python setup.py install`? – Anthon Aug 21 '16 at 05:21
  • See that http://stackoverflow.com/questions/18558733/how-can-i-install-a-egg-python-package-on-windows-attempt-using-easy-install-n – Manefesto Aug 21 '16 at 06:25
  • They were all installed via the command line with the 3rd method, `python setup.py install` – Matt Aug 21 '16 at 06:25

0 Answers0