Skip to content

Instantly share code, notes, and snippets.

@lbrealdev
Last active June 17, 2023 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbrealdev/3c5c16d43b2dd7bac25b55c7859257a6 to your computer and use it in GitHub Desktop.
Save lbrealdev/3c5c16d43b2dd7bac25b55c7859257a6 to your computer and use it in GitHub Desktop.
Python Virtualenv For Windows

Virtualenv

Install

pip install virtualenv

pip install virtualenvwrapper-win

Create virtualenv

Execute virtualenv or mkvirtualenv, but creating with mkvirtualenv will create your env in C:\Users\Username\Evns\. With virtualenv will create your env in your current directory.

virtualenv testspy


mkvirtualenv testpy

Activate Windows

activate.bat

or

.\Scripts\activate

Deactivate Windows

deactivate.bat

or

.\Scripts\deactivate.bat

For check your env execute:

pip list

pip        20.0.2
setuptools 45.2.0
wheel      0.34.2

You can see the difference of your packages list Python installed on virtualenv with packages Python installed in your system.

Source: python.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment