python -m -c <cfg> -a: launchpad not found
schuderer opened this issue · 2 comments
schuderer commented
When following the intro, at the command:
$ python -m launchpad -c examples/addition_cfg.yml -a
There's a ModuleNotFoundError: No module named 'launchpad'.
After changing around the imports in main.pt, the error is still:
* Serving Flask app "__main__" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
2019-06-28 16:51:58,476 INFO werkzeug: * Restarting with stat
Traceback (most recent call last):
File "C:\dev\code\launchpad\launchpad\__main__.py", line 4, in <module>
from .model_actions import train_model, retest, predict
ModuleNotFoundError: No module named '__main__.model_actions'; '__main__' is not a package
Can't reproduce on my machine, I think it has something to do with something that is different on Flask debugging server restarting
schuderer commented
Workaround:
$ set FLASK_APP=launchpad/wsgi.py:application
$ set LAUNCHPAD_CFG=examples/addition_cfg.yml
$ flask run
Edit: I put this in the README
schuderer commented
Update: Problem does not occur when using a fresh pipenv environment. Closing for now.