This is my project structure :
└──myfolder
└──myproject
├── __init__.py
├── tester.py
├── learners
│ ├── __init__.py
│ ├── bag_learner.py
│ ├── dqn_learner.py
│ ├── q_learner.py
│ ├── q_learner.pyc
│ ├── stock_dqn_learner.py
│ ├── stock_q_base_learner.py
│ └── stock_q_learner.py
└── utility
├── __init__.py
├── analysis.py
└── util.py
I usually run program by python tester.py
at myproject
directory.
Now I'm trying to run this program via gcp
command. What I did was to move to myfolder
directory and run program by gcloud ml-engine local train --module-name=myproject.tester --package-path=myproject
. But it occured an error:
File "myproject/learners/q_learner.py", line 6, in <module>
from utility import *
ImportError: No module named utility
I thought that program couldn't recognize myproject
directory as a PYTHONPATH
. So I changed directory to myproject
, and run program by gcloud ml-engine local train --module-name=tester --package-path=./
. but it also occured an error:
/Users/Chois/.pyenv/versions/2.7.13/bin/python2: No module named tester
How can I deal with it?