Skip to content

Commit

Permalink
Update python-virtual-environments.md
Browse files Browse the repository at this point in the history
  • Loading branch information
marshyon authored Jan 1, 2024
1 parent 4cad260 commit 111c544
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/pages/uploadz/python-virtual-environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,41 @@ keywords: "python, virtualenv, venv, docker, vscode"

# TL;DR

typically on Linux, you can create a virtual environment with:
typically on Linux, you can create a virtual environment with as little as:

```bash
python -m venv venv
```

but you may need to use `python3` depending on your system and perhaps to specify a path to pythyon with

```bash
python3 -m venv venv --python=/path/to/python3
```

and activate it with:
then activate the environment with:

```bash
source venv/bin/activate
```

on other system you may need to install `virtualenv` first:
on some system you may need to install `virtualenv` first:

```bash
pip install virtualenv
```

you may need to use `python` instead of `python3` depending on your system.
changes you make in your environment with `pip install [insert pip module here]` may be stored for future use with

```bash
pip freeze > requirements.txt
```

and re-applied with

```bash
pip install -r requirements.txt
```

# Why Python ?

Expand Down

0 comments on commit 111c544

Please sign in to comment.