This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
язык_программирования_python [2023/10/30 12:44] val |
язык_программирования_python [2023/10/30 12:59] (current) val |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Язык программирования Python ====== | ====== Язык программирования Python ====== | ||
+ | ===== Виртуальная среда Python ===== | ||
+ | * [[https://blog.sedicomm.com/2021/06/29/chto-takoe-venv-i-virtualenv-v-python-i-kak-ih-ispolzovat/|Что такое venv и virtualenv в Python, и как их использовать]] | ||
+ | * [[https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/|https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/]] | ||
<code> | <code> | ||
- | https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/ | + | # apt install python3-venv |
- | apt install python3-venv | + | # python3 -m venv /root/venv1 |
- | python3 -m venv /root/venv1 | + | # source /root/venv1/bin/activate |
- | source /root/venv1/bin/activate | + | (venv1) # which python |
- | which python | + | (venv1) # which ansible |
- | which ansible | + | |
- | + | ||
- | deactivate | + | |
+ | (venv1) # deactivate | ||
</code> | </code> |