use Python venv
parent
8b03a8b406
commit
764d27e167
|
@ -0,0 +1,21 @@
|
||||||
|
# Use Python venv
|
||||||
|
|
||||||
|
Python venv is Python Virtual Environment. Why do we need to use Python venv ? Because we don't want to mess up with Python packages which are stored in different location: system directories, user directories, ...
|
||||||
|
|
||||||
|
Assume you use Python 3 and Linux.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Python venv stores everything in a local directory.
|
||||||
|
|
||||||
|
Inside a directory, run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python -m venv venv
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can use venv with:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
source ./venv/bin/activate
|
||||||
|
```
|
Loading…
Reference in New Issue