Error installing Flask - Python Error installing Flask - Python flask flask

Error installing Flask - Python


Be sure, you use pip and python from venv

For a module/package to be installed by pip into virtualenv, you must use the pip from virtualenv.

For importing modules/packages being installed into virtualenv environment you have to run python interpreter from given virtualenv.

In case, you run your pip or python from directory C:\Python 34\Scripts, it is very likely, you use system wide pip and install flask into system Python. On Linux you would get problems as installing into system wide python requires root privileges, on MS Windows default Python installation it does not complain.

Advice: Create your virtualenv out of default Python installation directory and use pip and python from this virtulaenv. This is what usually happens, when you activate the virtualenv, so there is no need to explicitly using full path to pip or python (anyway, using explicit path to venv python and pip would not harm anything.


I had exactly the same problem as you, and the answer of Jan didn't work for me.

The problem was simply that I installed virtualenv using apt-get:

$ sudo apt-get install virtualenv

Instead of installing it with pip:

$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py$ sudo python get-pip.py$ sudo pip install virtualenv

It solved the problem for me. You can even uninstall the apt-get package after:

$ sudo apt-get remove virtualenv

virtualenv is still installed (but the good one!).


Did you add python to your path?

Try this:

  1. Click Start
  2. Search Advanced Systems setting and click
  3. Click on Environmental Variables.
  4. Append ;C:\python27 to the Path variable
  5. Restart the Command Prompt.