I have a script "splash.py" stored in C:\Users\cedwards\saved_scripts
I have added this directory in the System Variables in the variable "Path" (Environment Variables)
When I print all the values in sys.path I get ..
>>> import sys
>>> for val in sys.path:
... print val
...
C:\Python27\lib\site-packages\openpyxl-2.3.2-py2.7.egg
C:\Python27\lib\site-packages\et_xmlfile-1.0.1-py2.7.egg
C:\Python27\lib\site-packages\jdcal-1.2-py2.7.egg
C:\Python27\Lib
*C:\Python27\Scripts\* C:\Python27\DLLs
*C:\Python27\Scripts\* C:\Python27\Lib\lib-tk
*C:\Python27\Scripts\* C:\Users\cedwards\saved_scripts
C:\WINDOWS\system32\python27.zip
C:\Python27\DLLs
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages
C:\Python27\lib\site-packages\win32
C:\Python27\lib\site-packages\win32\lib
C:\Python27\lib\site-packages\Pythonwin
C:\Python27\lib\site-packages\wx-2.8-msw-unicode
>>>
The values in italics shouldnt be there? The values I entered into PATH are "C:\Python27\lib\site-packages\openpyxl-2.3.2-py2.7.egg;C:\Python27\lib\site-packages\et_xmlfile-1.0.1-py2.7.egg;C:\Python27\lib\site-packages\jdcal-1.2-py2.7.egg;C:\Python27\Lib;C:\Python27\DLLs;C:\Users\cedwards\saved_scripts;C:\WINDOWS\system32\python27.zip;C:\Python27\lib\plat-win;C:\Python27\lib\lib-tk;C:\Python27;C:\Python27\lib\site-packages;C:\Python27\lib\site-packages\win32;C:\Python27\lib\site-packages\win32\lib;C:\Python27\lib\site-packages\Pythonwin;C:\Python27\lib\site-packages\wx-2.8-msw-unicode"
Obvioulsy, when I try and import splash in a new script it does not work.
My question is, why is the *C:\Python27\Scripts* repeating? I think this is what is preventing my module from being imported.
sys.path
in python does not reflect the environmental variablePATH
butPYTHONPATH
. – Klaus D.