Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Build a Social Network with Flask Making Strong Users Our Project

Chris Grazioli
Chris Grazioli
31,225 Points

Where can I find out how to install a virtual env?

I've tried installing the virtual env, but seem to screw it up on my windows machine, even though I believe I install python in the PATH or whatever. Where can I find a good tutorial in installing a virtual env on a windows machine

3 Answers

Alx Ki
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Alx Ki
Python Web Development Techdegree Graduate 14,822 Points
  1. Here is an explanation by Kenneth Love: How to set Virtualenv on Windows 2.(Example) Here I set Virtualenv for example project in "exproject" folder using cmd.exe:
Microsoft Windows [Version 10.0.10586]

C:\Users\Alexey>mkdir exproject

C:\Users\Alexey>cd exproject

C:\Users\Alexey\exproject>python -m venv venv_folder

C:\Users\Alexey\exproject>venv_folder\Scripts\activate.bat
(venv_folder) C:\Users\Alexey\exproject>pip install flask
Collecting flask
  Using cached Flask-0.11.1-py2.py3-none-any.whl
Collecting click>=2.0 (from flask)
  Using cached click-6.6.tar.gz
Collecting Werkzeug>=0.7 (from flask)
  Using cached Werkzeug-0.11.11-py2.py3-none-any.whl
Collecting Jinja2>=2.4 (from flask)
  Using cached Jinja2-2.8-py2.py3-none-any.whl
Collecting itsdangerous>=0.21 (from flask)
  Using cached itsdangerous-0.24.tar.gz
Collecting MarkupSafe (from Jinja2>=2.4->flask)
  Using cached MarkupSafe-0.23.tar.gz
Installing collected packages: click, Werkzeug, MarkupSafe, Jinja2, itsdangerous, flask
  Running setup.py install for click ... done
  Running setup.py install for MarkupSafe ... done
  Running setup.py install for itsdangerous ... done
Successfully installed Jinja2-2.8 MarkupSafe-0.23 Werkzeug-0.11.11 click-6.6 flask-0.11.1 itsdangerous-0.24
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

(venv_folder) C:\Users\Alexey\exproject>

Done!

Idan Melamed
Idan Melamed
16,285 Points

Virtualenv confused me a bit for a while.

Can you look at this link, and tell us what step do you have problems with?