Difference between revisions of "Python venv"
Jump to navigation
Jump to search
(Created page with "Establish a new virtual environment: python -m venv venv Next, activate it: source venv/bin/activate You should see the new prompt indicating you're inside the virtual envi...") |
|||
| Line 5: | Line 5: | ||
You should see the new prompt indicating you're inside the virtual environment: | You should see the new prompt indicating you're inside the virtual environment: | ||
(venv) $ | (venv) $ | ||
| + | Next install the versions you need of various packages, specifying their version numbers: | ||
| + | pip install numpy==1.22.0 | ||
| + | To exit, type: | ||
| + | (venv) $ deactivate | ||
Revision as of 17:12, 29 November 2022
Establish a new virtual environment:
python -m venv venv
Next, activate it:
source venv/bin/activate
You should see the new prompt indicating you're inside the virtual environment:
(venv) $
Next install the versions you need of various packages, specifying their version numbers:
pip install numpy==1.22.0
To exit, type:
(venv) $ deactivate