linux - Python3 root sudo venv -


i running python3.5 on ubuntu via ssh , have errors there. don't why. if run following commands respective errors:

(venv) root@servername: python3 __init__.py 

file "__init__.py", line 1, in <module> import flask
importerror: no module named 'flask'

if run sudo this, error:

(venv) root@servername: sudo python3 __init__.py 

file "__init__.py", line 2, in <module> .content_management import content
systemerror: parent module '' not loaded, cannot perform relative import

and if run firefox, cause flask app, website works , shows no errors! whats going on here??? going crazy this!!

seems didn't install flask module on machine run python script. produces importerror get.

install flask module e.g. using pip:

$ pip install flask 

after you've done so, python should able load module.


Comments

Popular posts from this blog

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -