Pycharm interpreter error for Flaskr application (official Flask tutorial sample) -
my context
i'm educating myself python flask via official tutorial.
i'm using pycharm ide (community edition) in ubuntu destkop 16.
the issue
i open sample code of tutorial pycharm project
got
invalid python interpreter
error below snapshot
my question
how can fix it?
it's looking functional python installation.
if open 2
drop-down you've referenced you'll see selection of python installations on machine.
the better option though, create virtualenv current project, click on cog icon right of project interpreter
drop-down , click create virtualenv
, follow prompts.
once created, should pick virtualenv default python interpreter project , error disappear, though remember, because it's new virtualenv, won't yet have flask etc installed on it. can install flask library clicking +
icon underneath cog , searching/installing flask.
alternatively, create requirements.txt
file on project root directory, flask
contents, , pycharm notice next time in .py
file , suggest automatically install flask.
Comments
Post a Comment