Python Forum
Trying to run Python Script in different directory on Windows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to run Python Script in different directory on Windows
#1
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
Reply
#2
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\;
Reply
#3
I tried it, it didn't work :(
Reply
#4
https://docs.python.org/3/using/windows....ng-modules
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020