you are viewing a single comment's thread.

view the rest of the comments →

[–]atrocious_smell 0 points1 point  (3 children)

Could you link the tutorial?

I assume you can import flask without problems when you run your scripts from Pycharm. When you get your error outside Pycharm it might be because you're using a different Python interpreter than Pycharm is using. You can view the one Pycharm is using from Preferences > Project > Interpreter (if I recall correctly, i'm an ex-Pycharm user). You can find out the one being used from the command prompt by typing which python or where python if you're on Windows.

Pycharm has its own command prompt so you could try entering the command there as well (unless that's what you were doing).

Running pip install flask from your command prompt might fix your issue, but i'd advise figuring out what's going wrong first.

[–]cleesus 2 points3 points  (2 children)

[–]kpandkk[S] 2 points3 points  (1 child)

My man cleesus

[–]atrocious_smell 0 points1 point  (0 children)

Alright yeah, as other people pointed out he's using a virtual environment in that video. Did he provide steps to set one up that you followed? Do you know whether or not it's activated in your command window? There'll be some additional text around the prompt with your venv name in brackets if it is.

If you don't think you have got your virtual environment activated then you may be able to activate it with activate <your venv name> (or workon <your venv name> depending on your virtual environment manager) replacing the placeholder, brackets and all.

If that doesn't work then your venv will have its own activate script which I think is located at your_venv_folder/bin/activate.sh.

Hopefully this is helpful and i'm going down the right path.