I have default directory in PyCharm named "Libraries" this is where all my python files are located. When I import files using the following it does not work.
from Libraries.my_python_file import my_function
But when I use file name without "Libraries." prefix it works
from my_python_file import my_function
Can anyone help me understand what it is that I am doing wrong?
I have the environment variable path set to the following
Try adding empty file __init__.py
in Libraries
directory.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.