falied to install flask under virutalenv on windows -- [Error 2] The system cannot find the file specified falied to install flask under virutalenv on windows -- [Error 2] The system cannot find the file specified windows windows

falied to install flask under virutalenv on windows -- [Error 2] The system cannot find the file specified


This issue seems to be related with the setuptools version installed in your virtualenv. Downgrading to an older version fixed it for me.

From your virtualenv:

pip install setuptools==21.2.1pip install flask


I had this problem yesterday. I resolved it by downloading the MarkupSafe wheel and installing with pip. The problem was way over my head. Something about compiler flags in order to suppress an error when generating the Speedups file, I think.

1) Download the wheel from the link above.

2) On Windows, open a command window in the same directory as the wheel.

3) run "pip Install "


The setup.py of MarkupSafe is broken for Win7 on my system where there is no C compiler. (I keep a separate VM for VC++ work) I did this to get it working:

pip download MarkupSafe mkdir temp open MarkupSafe-0.23.tar.gz with 7-zip, extract all to temp cd temp edit setup.py line 119 to read: if 0: #not (is_pypy or is_jython): python setup.py install

I did not try to debug setup.py to work correctly. I just wanted to try out Flask since it's supposed to be lightweight and easy to learn, and the official docs say it installs on Windows. Maybe I should go back to Perl...

Unlike the other poster, a global pip install of MarkupSafe didn't work for me either.

These links have other views/insights on the problem:https://github.com/pallets/markupsafe/issues/26https://github.com/babun/babun/issues/315