0

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.

Fred
  • 101
  • 1
  • 10

1 Answers1

1

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

Grismar
  • 27,561
  • 4
  • 31
  • 54