A
== sync, corrected by elderman == https://stackoverflow.com/a/41573588/10562663 with the last rights of 27.06.2021Recommendations for newcomersThis is a personal recommendation from the author of the reply: begin training with https://pypi.org/project/virtualenv/ and https://pypi.org/project/pip/ - The tools that work with both Python 2 and 3 versions and in different situations and take care of others as soon as you need them.PyPI non-standard library modules https://pypi.python.org/pypi/virtualenv a very popular tool to create an isolated environment for Python libraries. If you're not familiar with the intruding, I strongly recommend that you study it. I'll compare this tool to the end of the answer.It works as a group of files to the directory (e.g.: env/and then modified the variable environment PATH Adding a prefix to the user directory bin (e.g.: env/bin/) An exact copy of the binary python or python3 It's scattered in this directory and Python programmed to search for a library on this route first, in the director of the environment. This instrument is not part of the standard library Python, but is officially blessed. https://www.pypa.io/en/latest/ ♪ Units activated, you can put boxes into virtual space using pip♪ https://github.com/yyuu/pyenv used to insulate python versions. For example, you'd like to test your code for Python 2.7, 3.6, 3.7 and 3.8, then you'd need a decision to switch between them. After activation, to a variable environment PATH Added ~/.pyenv/shimswhere Python team matching files are locatedpython♪ pip) It's not a copy of Python's crew, but special violets who decide for the summer what Python's version to launch, based on the basis of PYENV_VERSION- removable environment or .python-version-File or ~/.pyenv/version file. pyenv also facilitates downloading and installation of several Python versions using the team pyenv install♪ https://github.com/yyuu/pyenv-virtualenv is a flame pyenvfrom the same author pyenv and makes it easy to use pyenv and virtualenv at the same time. However, if you use Python 3.3 or above, pyenv-virtualenv I'll try to start. python -m venvif available, otherwise virtualenv♪ You can use it. virtualenv and pyenv together, without pyenv-virtualenvif you don't need a convenient function. https://pypi.python.org/pypi/virtualenvwrapper - it's a set of extensions to virtualenv (See. http://virtualenvwrapper.readthedocs.io/en/latest/ ) You have teams like this. mkvirtualenv♪ lssitepackages and in particular workon different catalogues virtualenv♪ This tool is particularly useful if you need a few catalogues. virtualenv♪ https://github.com/yyuu/pyenv-virtualenvwrapper - it's a flame. pyenv the same author, for easy integration virtualenvwrapper Total pyenv♪ https://pypi.python.org/pypi/pipenv - to eat. Pipfile♪ pip and virtualenv One team on the command line. Catalogue virtualenv usually placed in ~/.local/share/virtualenvs/XXXwhere XXX is the helm of the project catalogue. It distinguishes this instrument from virtualenvwhere the directory is usually located in the project file. pipenv for use in the development of Python applications (as opposed to libraries). Alternatives pipenvlike https://pypi.org/project/poetry/ which I will not list here, as this issue concerns only packages with similar names.Standard librariespyvenv (not confused with https://github.com/yyuu/pyenv From the previous part, it's a crypt from Python 3, but https://docs.python.org/dev/whatsnew/3.6.html#id8 because there were problems (not to mention a confused name). Python 3.6+, exact equivalent - python3 -m venv♪ https://docs.python.org/3/library/venv.html - it's a Python 3 package you can start with help. python3 -m venv (although for some reasons some distribu distributives are a separate package, such as python3-venv Ubuntu/Debian). He serves the same purpose as that. virtualenvbut only has multiple functions ( https://virtualenv.pypa.io/en/latest/ ) virtualenv still more popular than venvespecially since the first one supports both Python 2 and 3.