0

So, I know how to actually install flask, via pip install Flask

But, I'm running a virtualenv with python3.4. The problem is, Flask is in fact installed. The problem is though, it is installed for python2.7 and not python3.4 .

I did run this command with the virtualenv activated via source bin/activate , but it seems to install it for python2.7 even though a virtualenv running python3.4 is activated.

How do I fix this? im pulling my hair out over this.

Thanks

7
  • pip3 , pip3.4 ? Commented Dec 11, 2016 at 21:31
  • The environment is python3.4. Commented Dec 11, 2016 at 21:33
  • you should have commands pip3 and pip3.4 to install for python3.4 Commented Dec 11, 2016 at 21:33
  • I tried, this, this doesnt work. Commented Dec 11, 2016 at 21:40
  • python3.4 -m pip install Flask ? Commented Dec 11, 2016 at 21:43

2 Answers 2

2

Since Python 3.3, you can use venv instead of virtualenv (see PEP 405). If you do so, running source bin/activate will set python command to python 3 and use the right pip.

you can create the environnement using:

python3 -m venv myEnvName

Hope this helps

Sign up to request clarification or add additional context in comments.

Comments

0

If you are using Pycharm just switch to python 3, and there is a list of packages installed. Hit add(+), and look for flask

You can switch to python 3 by hitting file-> setting -> Project:Projectname -> Project Interpreter

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.