Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
python [2017/10/12 18:08] popel created |
python [2017/10/13 12:08] bojar [Virtual environments] |
||
---|---|---|---|
Line 15: | Line 15: | ||
python3 -m venv my-project-name | python3 -m venv my-project-name | ||
where '' | where '' | ||
+ | **Caveat:** the path to the directory should be rather short, there is a limit on shebang paths so you can get strange errors like '' | ||
+ | |||
You can use any Python version for the new environment, | You can use any Python version for the new environment, | ||
Then activate it with | Then activate it with | ||
Line 25: | Line 27: | ||
Once finished, exit the virtual environment with | Once finished, exit the virtual environment with | ||
deactivate | deactivate | ||
- | If you decide you don't need the environment | + | If you decide you don't need the environment and any modules installed in this environment, |
Note that there are many alternative ways how to create virtual environments and install modules. The '' | Note that there are many alternative ways how to create virtual environments and install modules. The '' | ||
Line 34: | Line 36: | ||
===== Installing directly from Git ===== | ===== Installing directly from Git ===== | ||
- | If you are developing (contributing to) a Python tool version in git and want to install the newest version, you can use 'pip3 git+https:// | + | If you are developing (contributing to) a Python tool version in git and want to install the newest version, you can use ''pip3 git+https:/'''' |
You can also '' | You can also '' | ||
- | See [[https:// | + | See e.g. [[https:// |