Im pip-ing all my libraries to a folder called lib. My source code is in the directory scr.
My directory structure
Folder
-lib
-different libraries
-scr
-main.py
I just want to reference my libraries so my code will run.
Im pip-ing all my libraries to a folder called lib. My source code is in the directory scr.
My directory structure
Folder
-lib
-different libraries
-scr
-main.py
I just want to reference my libraries so my code will run.
You can use the sys
module to append the path.
import sys
sys.path.insert(0,'/Folder/src')
You need to append a path to Python's system path:
import os.path
import sys
sys.path += [os.path.abspath('../lib')]
import my_lib