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.
            Asked
            
        
        
            Active
            
        
            Viewed 130 times
        
    0
            
            
         
    
    
        Fred
        
- 101
- 1
- 10
- 
                    I have sovled this problem by https://stackoverflow.com/a/47561492/7209003 – Fred Dec 19 '18 at 03:16
1 Answers
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