The structure of my package is given below
package_test
main.py
__init__.py
folder_1
test_1.py
__init__.py
The main.py
contains something
from folder_1.test_1 import params
if __name__ == "__main__":
...
...
X, y = dataset
model = LASSO(**params)
...
I want to import X, y
to the test_1.py
file. The test_1.py
file contains
from package_test.main import X, y
...
...
def func():
...
...
return param
params = func()
I am running the program from the parent folder (from my desktop)
khali@akkas:~/Desktop$ python3 package_test/main.py --dataset=dataset1
But I am getting an error
ModuleNotFoundError: No module named 'package_test'
Could you tell me how can I solve this issue?