Olej писал(а): ↑08 ноя 2019, 00:01
Установили...
Создаём среду виртуальных окружений:
Код: Выделить всё
olej@ACER:~$ pwd
/home/olej
olej@ACER:~$ mkdir python-virtual-environments
olej@ACER:~$ cd python-virtual-environments
Код: Выделить всё
olej@ACER:~/python-virtual-environments$ python3 -m venv pv1
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Failing command: ['/home/olej/python-virtual-environments/pv1/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']
Облом...
Правим:
Код: Выделить всё
olej@ACER:~/python-virtual-environments$ sudo apt-get install python3-venv
Чтение списков пакетов… Готово
Построение дерева зависимостей
Чтение информации о состоянии… Готово
Будут установлены следующие дополнительные пакеты:
python3.7-venv
Следующие НОВЫЕ пакеты будут установлены:
python3-venv python3.7-venv
Обновлено 0 пакетов, установлено 2 новых пакетов, для удаления отмечено 0 пакетов, и 64 пакетов не обновлено.
Необходимо скачать 7 320 B архивов.
После данной операции объём занятого дискового пространства возрастёт на 44,0 kB.
Хотите продолжить? [Д/н] y
Пол:1 http://deb.debian.org/debian buster/main amd64 python3.7-venv amd64 3.7.3-2 [6 140 B]
Пол:2 http://deb.debian.org/debian buster/main amd64 python3-venv amd64 3.7.3-1 [1 180 B]
Получено 7 320 B за 0с (34,7 kB/s)
Выбор ранее не выбранного пакета python3.7-venv.
(Чтение базы данных … на данный момент установлено 414600 файлов и каталогов.)
Подготовка к распаковке …/python3.7-venv_3.7.3-2_amd64.deb …
Распаковывается python3.7-venv (3.7.3-2) …
Выбор ранее не выбранного пакета python3-venv.
Подготовка к распаковке …/python3-venv_3.7.3-1_amd64.deb …
Распаковывается python3-venv (3.7.3-1) …
Настраивается пакет python3.7-venv (3.7.3-2) …
Настраивается пакет python3-venv (3.7.3-1) …
Обрабатываются триггеры для man-db (2.8.5-2) …
Создаём
конкретное изолированное окружение:
Код: Выделить всё
olej@ACER:~/python-virtual-environments$ python3 -m venv pv1
Код: Выделить всё
olej@ACER:~/python-virtual-environments$ tree pv1
pv1
├── bin
│ ├── activate
│ ├── activate.csh
│ ├── activate.fish
│ ├── easy_install
│ ├── easy_install-3.7
│ ├── pip
│ ├── pip3
│ ├── pip3.7
│ ├── python -> python3
│ └── python3 -> /usr/bin/python3
├── include
├── lib
│ └── python3.7
│ └── site-packages
│ ├── easy_install.py
│ ├── pip
│ │ ├── __init__.py
│ │ ├── _internal
│ │ │ ├── build_env.py
│ │ │ ├── cache.py
│ │ │ ├── cli
│ │ │ │ ├── autocompletion.py
│ │ │ │ ├── base_command.py
│ │ │ │ ├── cmdoptions.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── main_parser.py
│ │ │ │ ├── parser.py
│ │ │ │ ├── __pycache__
│ │ │ │ │ ├── autocompletion.cpython-37.pyc
│ │ │ │ │ ├── base_command.cpython-37.pyc
│ │ │ │ │ ├── cmdoptions.cpython-37.pyc
│ │ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ │ ├── main_parser.cpython-37.pyc
│ │ │ │ │ ├── parser.cpython-37.pyc
│ │ │ │ │ └── status_codes.cpython-37.pyc
│ │ │ │ └── status_codes.py
│ │ │ ├── commands
│ │ │ │ ├── check.py
│ │ │ │ ├── completion.py
│ │ │ │ ├── configuration.py
│ │ │ │ ├── download.py
│ │ │ │ ├── freeze.py
│ │ │ │ ├── hash.py
│ │ │ │ ├── help.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── install.py
│ │ │ │ ├── list.py
│ │ │ │ ├── __pycache__
│ │ │ │ │ ├── check.cpython-37.pyc
│ │ │ │ │ ├── completion.cpython-37.pyc
│ │ │ │ │ ├── configuration.cpython-37.pyc
│ │ │ │ │ ├── download.cpython-37.pyc
│ │ │ │ │ ├── freeze.cpython-37.pyc
│ │ │ │ │ ├── hash.cpython-37.pyc
│ │ │ │ │ ├── help.cpython-37.pyc
│ │ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ │ ├── install.cpython-37.pyc
│ │ │ │ │ ├── list.cpython-37.pyc
│ │ │ │ │ ├── search.cpython-37.pyc
│ │ │ │ │ ├── show.cpython-37.pyc
│ │ │ │ │ ├── uninstall.cpython-37.pyc
│ │ │ │ │ └── wheel.cpython-37.pyc
│ │ │ │ ├── search.py
│ │ │ │ ├── show.py
│ │ │ │ ├── uninstall.py
│ │ │ │ └── wheel.py
│ │ │ ├── configuration.py
│ │ │ ├── download.py
│ │ │ ├── exceptions.py
│ │ │ ├── index.py
│ │ │ ├── __init__.py
│ │ │ ├── locations.py
│ │ │ ├── models
│ │ │ │ ├── candidate.py
│ │ │ │ ├── format_control.py
│ │ │ │ ├── index.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── link.py
│ │ │ │ └── __pycache__
│ │ │ │ ├── candidate.cpython-37.pyc
│ │ │ │ ├── format_control.cpython-37.pyc
│ │ │ │ ├── index.cpython-37.pyc
│ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ └── link.cpython-37.pyc
│ │ │ ├── operations
│ │ │ │ ├── check.py
│ │ │ │ ├── freeze.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── prepare.py
│ │ │ │ └── __pycache__
│ │ │ │ ├── check.cpython-37.pyc
│ │ │ │ ├── freeze.cpython-37.pyc
│ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ └── prepare.cpython-37.pyc
│ │ │ ├── pep425tags.py
│ │ │ ├── __pycache__
│ │ │ │ ├── build_env.cpython-37.pyc
│ │ │ │ ├── cache.cpython-37.pyc
│ │ │ │ ├── configuration.cpython-37.pyc
│ │ │ │ ├── download.cpython-37.pyc
│ │ │ │ ├── exceptions.cpython-37.pyc
│ │ │ │ ├── index.cpython-37.pyc
│ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ ├── locations.cpython-37.pyc
│ │ │ │ ├── pep425tags.cpython-37.pyc
│ │ │ │ ├── pyproject.cpython-37.pyc
│ │ │ │ ├── resolve.cpython-37.pyc
│ │ │ │ └── wheel.cpython-37.pyc
│ │ │ ├── pyproject.py
│ │ │ ├── req
│ │ │ │ ├── constructors.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── __pycache__
│ │ │ │ │ ├── constructors.cpython-37.pyc
│ │ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ │ ├── req_file.cpython-37.pyc
│ │ │ │ │ ├── req_install.cpython-37.pyc
│ │ │ │ │ ├── req_set.cpython-37.pyc
│ │ │ │ │ ├── req_tracker.cpython-37.pyc
│ │ │ │ │ └── req_uninstall.cpython-37.pyc
│ │ │ │ ├── req_file.py
│ │ │ │ ├── req_install.py
│ │ │ │ ├── req_set.py
│ │ │ │ ├── req_tracker.py
│ │ │ │ └── req_uninstall.py
│ │ │ ├── resolve.py
│ │ │ ├── utils
│ │ │ │ ├── appdirs.py
│ │ │ │ ├── compat.py
│ │ │ │ ├── deprecation.py
│ │ │ │ ├── encoding.py
│ │ │ │ ├── filesystem.py
│ │ │ │ ├── glibc.py
│ │ │ │ ├── hashes.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── logging.py
│ │ │ │ ├── misc.py
│ │ │ │ ├── models.py
│ │ │ │ ├── outdated.py
│ │ │ │ ├── packaging.py
│ │ │ │ ├── __pycache__
│ │ │ │ │ ├── appdirs.cpython-37.pyc
│ │ │ │ │ ├── compat.cpython-37.pyc
│ │ │ │ │ ├── deprecation.cpython-37.pyc
│ │ │ │ │ ├── encoding.cpython-37.pyc
│ │ │ │ │ ├── filesystem.cpython-37.pyc
│ │ │ │ │ ├── glibc.cpython-37.pyc
│ │ │ │ │ ├── hashes.cpython-37.pyc
│ │ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ │ ├── logging.cpython-37.pyc
│ │ │ │ │ ├── misc.cpython-37.pyc
│ │ │ │ │ ├── models.cpython-37.pyc
│ │ │ │ │ ├── outdated.cpython-37.pyc
│ │ │ │ │ ├── packaging.cpython-37.pyc
│ │ │ │ │ ├── setuptools_build.cpython-37.pyc
│ │ │ │ │ ├── temp_dir.cpython-37.pyc
│ │ │ │ │ ├── typing.cpython-37.pyc
│ │ │ │ │ └── ui.cpython-37.pyc
│ │ │ │ ├── setuptools_build.py
│ │ │ │ ├── temp_dir.py
│ │ │ │ ├── typing.py
│ │ │ │ └── ui.py
│ │ │ ├── vcs
│ │ │ │ ├── bazaar.py
│ │ │ │ ├── git.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── mercurial.py
│ │ │ │ ├── __pycache__
│ │ │ │ │ ├── bazaar.cpython-37.pyc
│ │ │ │ │ ├── git.cpython-37.pyc
│ │ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ │ ├── mercurial.cpython-37.pyc
│ │ │ │ │ └── subversion.cpython-37.pyc
│ │ │ │ └── subversion.py
│ │ │ └── wheel.py
│ │ ├── __main__.py
│ │ ├── __pycache__
│ │ │ ├── __init__.cpython-37.pyc
│ │ │ └── __main__.cpython-37.pyc
│ │ └── _vendor
│ │ ├── __init__.py
│ │ ├── pep517
│ │ │ ├── check.py
│ │ │ ├── colorlog.py
│ │ │ ├── compat.py
│ │ │ ├── envbuild.py
│ │ │ ├── __init__.py
│ │ │ ├── _in_process.py
│ │ │ ├── __pycache__
│ │ │ │ ├── check.cpython-37.pyc
│ │ │ │ ├── colorlog.cpython-37.pyc
│ │ │ │ ├── compat.cpython-37.pyc
│ │ │ │ ├── envbuild.cpython-37.pyc
│ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ ├── _in_process.cpython-37.pyc
│ │ │ │ └── wrappers.cpython-37.pyc
│ │ │ └── wrappers.py
│ │ └── __pycache__
│ │ └── __init__.cpython-37.pyc
│ ├── pip-18.1.dist-info
│ │ ├── entry_points.txt
│ │ ├── INSTALLER
│ │ ├── LICENSE.txt
│ │ ├── METADATA
│ │ ├── RECORD
│ │ ├── top_level.txt
│ │ └── WHEEL
│ ├── pkg_resources
│ │ ├── extern
│ │ │ ├── __init__.py
│ │ │ └── __pycache__
│ │ │ └── __init__.cpython-37.pyc
│ │ ├── __init__.py
│ │ ├── py31compat.py
│ │ ├── __pycache__
│ │ │ ├── __init__.cpython-37.pyc
│ │ │ └── py31compat.cpython-37.pyc
│ │ └── _vendor
│ │ ├── appdirs.py
│ │ ├── __init__.py
│ │ ├── packaging
│ │ │ ├── __about__.py
│ │ │ ├── _compat.py
│ │ │ ├── __init__.py
│ │ │ ├── markers.py
│ │ │ ├── __pycache__
│ │ │ │ ├── __about__.cpython-37.pyc
│ │ │ │ ├── _compat.cpython-37.pyc
│ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ ├── markers.cpython-37.pyc
│ │ │ │ ├── requirements.cpython-37.pyc
│ │ │ │ ├── specifiers.cpython-37.pyc
│ │ │ │ ├── _structures.cpython-37.pyc
│ │ │ │ ├── utils.cpython-37.pyc
│ │ │ │ └── version.cpython-37.pyc
│ │ │ ├── requirements.py
│ │ │ ├── specifiers.py
│ │ │ ├── _structures.py
│ │ │ ├── utils.py
│ │ │ └── version.py
│ │ ├── __pycache__
│ │ │ ├── appdirs.cpython-37.pyc
│ │ │ ├── __init__.cpython-37.pyc
│ │ │ ├── pyparsing.cpython-37.pyc
│ │ │ └── six.cpython-37.pyc
│ │ ├── pyparsing.py
│ │ └── six.py
│ ├── pkg_resources-0.0.0.dist-info
│ │ ├── AUTHORS.txt
│ │ ├── INSTALLER
│ │ ├── LICENSE.txt
│ │ ├── METADATA
│ │ ├── RECORD
│ │ └── WHEEL
│ ├── __pycache__
│ │ └── easy_install.cpython-37.pyc
│ ├── setuptools
│ │ ├── archive_util.py
│ │ ├── build_meta.py
│ │ ├── cli-32.exe
│ │ ├── cli-64.exe
│ │ ├── cli.exe
│ │ ├── command
│ │ │ ├── alias.py
│ │ │ ├── bdist_egg.py
│ │ │ ├── bdist_rpm.py
│ │ │ ├── bdist_wininst.py
│ │ │ ├── build_clib.py
│ │ │ ├── build_ext.py
│ │ │ ├── build_py.py
│ │ │ ├── develop.py
│ │ │ ├── dist_info.py
│ │ │ ├── easy_install.py
│ │ │ ├── egg_info.py
│ │ │ ├── __init__.py
│ │ │ ├── install_egg_info.py
│ │ │ ├── install_lib.py
│ │ │ ├── install.py
│ │ │ ├── install_scripts.py
│ │ │ ├── launcher manifest.xml
│ │ │ ├── py36compat.py
│ │ │ ├── __pycache__
│ │ │ │ ├── alias.cpython-37.pyc
│ │ │ │ ├── bdist_egg.cpython-37.pyc
│ │ │ │ ├── bdist_rpm.cpython-37.pyc
│ │ │ │ ├── bdist_wininst.cpython-37.pyc
│ │ │ │ ├── build_clib.cpython-37.pyc
│ │ │ │ ├── build_ext.cpython-37.pyc
│ │ │ │ ├── build_py.cpython-37.pyc
│ │ │ │ ├── develop.cpython-37.pyc
│ │ │ │ ├── dist_info.cpython-37.pyc
│ │ │ │ ├── easy_install.cpython-37.pyc
│ │ │ │ ├── egg_info.cpython-37.pyc
│ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ ├── install.cpython-37.pyc
│ │ │ │ ├── install_egg_info.cpython-37.pyc
│ │ │ │ ├── install_lib.cpython-37.pyc
│ │ │ │ ├── install_scripts.cpython-37.pyc
│ │ │ │ ├── py36compat.cpython-37.pyc
│ │ │ │ ├── register.cpython-37.pyc
│ │ │ │ ├── rotate.cpython-37.pyc
│ │ │ │ ├── saveopts.cpython-37.pyc
│ │ │ │ ├── sdist.cpython-37.pyc
│ │ │ │ ├── setopt.cpython-37.pyc
│ │ │ │ ├── test.cpython-37.pyc
│ │ │ │ ├── upload.cpython-37.pyc
│ │ │ │ └── upload_docs.cpython-37.pyc
│ │ │ ├── register.py
│ │ │ ├── rotate.py
│ │ │ ├── saveopts.py
│ │ │ ├── sdist.py
│ │ │ ├── setopt.py
│ │ │ ├── test.py
│ │ │ ├── upload_docs.py
│ │ │ └── upload.py
│ │ ├── config.py
│ │ ├── depends.py
│ │ ├── _deprecation_warning.py
│ │ ├── dep_util.py
│ │ ├── dist.py
│ │ ├── extension.py
│ │ ├── extern
│ │ │ ├── __init__.py
│ │ │ └── __pycache__
│ │ │ └── __init__.cpython-37.pyc
│ │ ├── glibc.py
│ │ ├── glob.py
│ │ ├── gui-32.exe
│ │ ├── gui-64.exe
│ │ ├── gui.exe
│ │ ├── __init__.py
│ │ ├── launch.py
│ │ ├── lib2to3_ex.py
│ │ ├── monkey.py
│ │ ├── msvc.py
│ │ ├── namespaces.py
│ │ ├── package_index.py
│ │ ├── pep425tags.py
│ │ ├── py27compat.py
│ │ ├── py31compat.py
│ │ ├── py33compat.py
│ │ ├── __pycache__
│ │ │ ├── archive_util.cpython-37.pyc
│ │ │ ├── build_meta.cpython-37.pyc
│ │ │ ├── config.cpython-37.pyc
│ │ │ ├── depends.cpython-37.pyc
│ │ │ ├── _deprecation_warning.cpython-37.pyc
│ │ │ ├── dep_util.cpython-37.pyc
│ │ │ ├── dist.cpython-37.pyc
│ │ │ ├── extension.cpython-37.pyc
│ │ │ ├── glibc.cpython-37.pyc
│ │ │ ├── glob.cpython-37.pyc
│ │ │ ├── __init__.cpython-37.pyc
│ │ │ ├── launch.cpython-37.pyc
│ │ │ ├── lib2to3_ex.cpython-37.pyc
│ │ │ ├── monkey.cpython-37.pyc
│ │ │ ├── msvc.cpython-37.pyc
│ │ │ ├── namespaces.cpython-37.pyc
│ │ │ ├── package_index.cpython-37.pyc
│ │ │ ├── pep425tags.cpython-37.pyc
│ │ │ ├── py27compat.cpython-37.pyc
│ │ │ ├── py31compat.cpython-37.pyc
│ │ │ ├── py33compat.cpython-37.pyc
│ │ │ ├── sandbox.cpython-37.pyc
│ │ │ ├── site-patch.cpython-37.pyc
│ │ │ ├── ssl_support.cpython-37.pyc
│ │ │ ├── unicode_utils.cpython-37.pyc
│ │ │ ├── version.cpython-37.pyc
│ │ │ ├── wheel.cpython-37.pyc
│ │ │ └── windows_support.cpython-37.pyc
│ │ ├── sandbox.py
│ │ ├── script (dev).tmpl
│ │ ├── script.tmpl
│ │ ├── site-patch.py
│ │ ├── ssl_support.py
│ │ ├── unicode_utils.py
│ │ ├── _vendor
│ │ │ ├── __init__.py
│ │ │ ├── packaging
│ │ │ │ ├── __about__.py
│ │ │ │ ├── _compat.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── markers.py
│ │ │ │ ├── __pycache__
│ │ │ │ │ ├── __about__.cpython-37.pyc
│ │ │ │ │ ├── _compat.cpython-37.pyc
│ │ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ │ ├── markers.cpython-37.pyc
│ │ │ │ │ ├── requirements.cpython-37.pyc
│ │ │ │ │ ├── specifiers.cpython-37.pyc
│ │ │ │ │ ├── _structures.cpython-37.pyc
│ │ │ │ │ ├── utils.cpython-37.pyc
│ │ │ │ │ └── version.cpython-37.pyc
│ │ │ │ ├── requirements.py
│ │ │ │ ├── specifiers.py
│ │ │ │ ├── _structures.py
│ │ │ │ ├── utils.py
│ │ │ │ └── version.py
│ │ │ ├── __pycache__
│ │ │ │ ├── __init__.cpython-37.pyc
│ │ │ │ ├── pyparsing.cpython-37.pyc
│ │ │ │ └── six.cpython-37.pyc
│ │ │ ├── pyparsing.py
│ │ │ └── six.py
│ │ ├── version.py
│ │ ├── wheel.py
│ │ └── windows_support.py
│ └── setuptools-40.8.0.dist-info
│ ├── AUTHORS.txt
│ ├── dependency_links.txt
│ ├── entry_points.txt
│ ├── INSTALLER
│ ├── LICENSE.txt
│ ├── METADATA
│ ├── RECORD
│ ├── top_level.txt
│ ├── WHEEL
│ └── zip-safe
├── lib64 -> lib
├── pyvenv.cfg
└── share
└── python-wheels
├── appdirs-1.4.3-py2.py3-none-any.whl
├── CacheControl-0.11.7-py2.py3-none-any.whl
├── certifi-2018.8.24-py2.py3-none-any.whl
├── chardet-3.0.4-py2.py3-none-any.whl
├── colorama-0.3.7-py2.py3-none-any.whl
├── distlib-0.2.8-py2.py3-none-any.whl
├── distro-1.3.0-py2.py3-none-any.whl
├── html5lib-1.0.1-py2.py3-none-any.whl
├── idna-2.6-py2.py3-none-any.whl
├── ipaddress-0.0.0-py2.py3-none-any.whl
├── lockfile-0.12.2-py2.py3-none-any.whl
├── packaging-19.0-py2.py3-none-any.whl
├── pip-18.1-py2.py3-none-any.whl
├── pkg_resources-0.0.0-py2.py3-none-any.whl
├── progress-1.2-py2.py3-none-any.whl
├── pyparsing-2.2.0-py2.py3-none-any.whl
├── pytoml-0.1.2-py2.py3-none-any.whl
├── requests-2.21.0-py2.py3-none-any.whl
├── retrying-1.3.3-py2.py3-none-any.whl
├── setuptools-40.8.0-py2.py3-none-any.whl
├── six-1.12.0-py2.py3-none-any.whl
├── urllib3-1.24.1-py2.py3-none-any.whl
├── webencodings-0.5.1-py2.py3-none-any.whl
└── wheel-0.32.3-py2.py3-none-any.whl
52 directories, 395 files
Код: Выделить всё
olej@ACER:~/python-virtual-environments$ du -hs pv1
6,7M pv1
И таким образом можем создать
сколько угодно изолированных виртуальных окружений...