+ 4

What is the purpose of PYTHON PATH environment variable??

22nd Aug 2018, 4:38 AM
Arpita
Arpita - avatar
4 odpowiedzi
+ 5
PYTHONPATH points to many directories where extra python packages are installed. for example, let's say you've created a directory, my_modules, for packages you've created that you want to import into your projects. if you try to import anything from my_modules, you'll just get an import error because python doesn't know about your directory. to get python to correctly locate anything in my_modules, you'll have to add the absolute path to my_modules to PYTHONPATH. tl;dr PYTHONPATH's purpose is to correctly locate python packages and modules across your filesystem
22nd Aug 2018, 6:47 AM
Aidan Haddon-Wright
Aidan Haddon-Wright - avatar
+ 1
you need to have the right environment variables to compli python programms
22nd Aug 2018, 8:26 AM
Varun Vrd
Varun Vrd - avatar
+ 1
Thanks a lot.......
28th Aug 2018, 9:54 AM
Arpita
Arpita - avatar
0
Thx a lot
9th Apr 2019, 10:19 AM
Jeanne d' Arc NYIRAMWIZA
Jeanne d' Arc NYIRAMWIZA - avatar