How to correctly use python libraries under Windows?
Question: I am using Windows 10 and I would like to import a library from some place
`P:\_Testing\Tools\Selenium\Basic` (which I added to `PYTHONPATH`). I have the
following script:

    
    
    print(os.environ['PYTHONPATH'])
    from Basic import basic
    

and the path `P:\_Testing\Tools\Selenium\Basic` contains two files: a non-
empty file `basic.py` and an empty file `__init__.py`. However, when running
the script, I get the following output:

> Y:\BFH\Selenium\BFH_ARoeffnen.py;P:_Testing\Tools\Selenium\Basic;C:\Program
> Files (x86)\JetBrains\PyCharm Community Edition 5.0.4\helpers\pycharm
>  
>  
>     Error
>     Traceback (most recent call last):
>       File "Y:\BFH\Selenium\BFH_ARoeffnen.py", line 25, in
> test_b_f_h_a_roeffnen
>         from Basic import basic
>     ImportError: No module named 'Basic'
>  

So why does this not work? How to include the library in the given path
correctly?


Answer: You can import basic directly, because the Basic folder is right in your
PYTHONPATH. Just like search files right in this folder, you can get result
include: basic.py **init**.py But can not find Basic folder itself.

