No module named flask

npm start rendered the following error…

[email protected]:~/q2studio-0.0.6$ npm start

> [email protected] start /home/qiime2/q2studio-0.0.6
> cross-env NODE_ENV=production electron -r babel-register build/main.js

API (error): Traceback (most recent call last):
API (error):   File "/miniconda3/lib/python3.5/runpy.py", line 174, in _run_module_as_main
API (error):     mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
API (error):   File "/miniconda3/lib/python3.5/runpy.py", line 133, in _get_module_details
API (error):     return _get_module_details(pkg_main_name, error)
API (error):   File "/miniconda3/lib/python3.5/runpy.py", line 109, in _get_module_details
API (error):     __import__(pkg_name)
API (error):   File "/home/qiime2/q2studio-0.0.6/q2studio/__init__.py", line 9, in <module>
API (error):     from .server import start_server
API (error):   File "/home/qiime2/q2studio-0.0.6/q2studio/server.py", line 13, in <module>
API (error):     from flask import Flask
API (error): ImportError: No module named 'flask'
API process exited with code 1

Hey @moryfranklin22,

Looking at the tracelog and seeing /miniconda3/lib/python3.5/runpy.py makes it seem like the npm start command was ran outside of your qiime2 conda environment. If this were ran within your conda environment that has the qiime2 system installed, it should be failing with a path of /miniconda3/envs/<your_env_name>/lib/python3.5/runpy.py instead of the root runpy.py. Try to run source activate <your_env_name> before calling the npm start command and let me know if it solves your issue!

2 Likes

An off-topic reply has been split into a new topic: Electron failed to install correctly

Please keep replies on-topic in the future.