Python Forum

Full Version: Trying to run Python Script in different directory on Windows
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Supp all

I have been stabbing myself on this but I can't figure out why my script can't run correctly... :(

My installation files (where I installed the packages as well) are located in C:\Python37 and My scripts are located in C:\PythonScripts

I know I can save the scripts files where the rest of the package/installs are located and run it fine, but for organization sake I want to separate the files. Is this possible?

Note: I have already added the environment variable on my Windows machine as C:\Python37 and C:\PythonScripts

Thnxx for any help
I suggest you stop stabbing yourself, it won't help you'll just bleed to death.

Go to My Computer > Properties > Advanced System Settings > Environment Variables > Click New under User Variables
Variable Name = PYTHONPATH
Variable Value = C:\PythonScripts\;
I tried it, it didn't work :(