PYTHONPATH is an environment variable which the user can set to add additional directories that the user wants Python to add to the sys.path directory list. In short, we can say that it is an environment variable that you set before running the Python interpreter. Mostly you should not set these variables as they are not needed for Python to execute normal programs because it knows where its standard library is to be found. PYTHONPATH is used to help in importing the modules. So, when you import modules in your Python scripts, PYTHONPATH is also checked to see which directories might contain the imported module. How to add to the PYTHONPATH in windows? My Computer > Properties > Advanced System Settings > Environment Variables > Click the “New” button in the top half of the dialog, to make a new user variable. Give the variable name as PYTHONPATH and the value is the path to the code directory. C lick OK and then OK to save this variable. To confirm PYTHONPATH,...
Comments
Post a Comment