I want to change the directories in which Python looks for my packages and modules, and changing PYTHONPATH in Windows 10 Environment Variables does not work. So the only solution left (apparently) is to place a .pth file in my package folder.

How do I create a .pth file ? How can I write in it, how can I open it ?

Also, what should I write in it in order for Python to find it and to be able to import my package ?

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.