Error Installing Flask - Python
Solution 1:
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.
Solution 2:
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-getremove virtualenv
virtualenv
is still installed (but the good one!).
Solution 3:
Did you add python to your path?
Try this:
- Click Start
- Search Advanced Systems setting and click
- Click on Environmental Variables.
- Append ;C:\python27 to the Path variable
- Restart the Command Prompt.
Post a Comment for "Error Installing Flask - Python"