How to add a directory to pythonpath in Windows 7

Asked 1 years ago, Updated 1 years ago, 109 views

I created a dictionary that manages all of my Django apps (C:\My_Projects). I would like to call the app right away by adding the directory to python path.

In the Windows GUI environment (My Computer > Properties > Advanced System Settings > Environment Variables ), we tried to add C:\My_Projects; to the Path environment, but the color module still fails to read the following error:

Error: No module named coltrane

environment-variables windows python pythonpath

2022-09-21 19:36

1 Answers

I use Windows on the following ways.

My Computer > Properties > Advanced System Settings > Environment Variables >

You can enter the system variables as above to create a new environment variable called PythonPath and add C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\other-fooler-the-path-the-code> to the value.

This was the most effective way for me.

For your information, if it is not solved by the above method, the environment variable value is

C:\Python27;

Try adding.


2022-09-21 19:36

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.