venv
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
venv [2021/11/17 21:54] – created nico | venv [2022/06/15 16:37] (current) – nico | ||
---|---|---|---|
Line 1: | Line 1: | ||
The aim of virtualenv is to provide your own instance of Python as maintaining different versions of packages is really tricky. This tutorial shows how to have a tailored Python environement for your program : | The aim of virtualenv is to provide your own instance of Python as maintaining different versions of packages is really tricky. This tutorial shows how to have a tailored Python environement for your program : | ||
- | You can create a directory for your program | + | You can create a directory for your program |
- | nicolas.greneche@magi1: | + | |
- | nicolas.greneche@magi1: | + | nicolas.greneche@magi1: |
- | > | + | |
- | > Ensuite tu crée un virtualenv | + | Then, you can create a virtualenv |
- | > | + | |
- | > nicolas.greneche@magi1: | + | nicolas.greneche@magi1: |
- | > | + | |
- | > Tu actives | + | You may activate the brand new environement |
- | > | + | |
- | > nicolas.greneche@magi1: | + | nicolas.greneche@magi1: |
- | > | + | |
- | > Comme tu peux le voir, ton nouvel interpreteur python est celui du virtualenv : | + | You can check that your default Python is from the virtualenv : |
- | > | + | |
- | > (venv) nicolas.greneche@magi1: | + | (venv) nicolas.greneche@magi1: |
- | > / | + | / |
- | > | + | |
- | > Et enfin tu peux installer les packages | + | Finally, you can install your own packages |
- | > | + | |
- | > (venv) nicolas.greneche@magi1: | + | (venv) nicolas.greneche@magi1: |
venv.1637182452.txt.gz · Last modified: 2021/11/17 21:54 by nico