Reputation: 101
when I used or write a 3rd party library of python, I want import it in my code file.
In linux set environment variable $PYTHONPATH and works well.
But in Windows, After setting environment variable PYTHONPATH and rebooting,it didn't work. Especially in PyCharm terminal.
Upvotes: 0
Views: 158
Reputation: 31329
If your question is specific to PyCharm, I recommend either installing the package into the virtual environment / interpreter you're using for the project from File - Settings - Project: name - Project Interpreter
or adding the library to your project and setting the folder to be recognised as a source folder by PyCharm.
Right-click the library folder, then select Mark Directory as - Sources Root
Upvotes: 1