Forked from pandafulmanda/Python3 Virtualenv Setup.md
Created
November 16, 2020 03:09
-
-
Save mkdika/29ba8cad76bfccdce5856e1a7b0e97a5 to your computer and use it in GitHub Desktop.
Setting up and using Python3 Virtualenv on Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To install virtualenv via pip | |
| $ pip3 install virtualenv | |
| Note that virtualenv installs to the python3 directory. For me it's: | |
| $ /usr/local/share/python3/virtualenv | |
| Create a virtualenvs directory to store all virtual environments | |
| $ mkdir somewhere/virtualenvs | |
| Make a new virtual environment with no packages | |
| $ virtualenv somewhere/virtualenvs/<project-name> --no-site-packages | |
| To use the virtual environment | |
| $ cd somewhere/virtualenvs/<project-name>/bin | |
| $ source activate | |
| You are now using the virtual environment for <project-name>. To stop: | |
| $ deactivate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment