[PYTHON] What is pyvenv
What is pyvenv
- A mechanism to have separate library sets required for development according to the purpose
Example of use
Example of a case where two projects (Project A and Project B) are developed with one development machine
- For project A, I want to use libray A ver.1.0 and library B ver.1.0.
- In project B, I want to use ver.2.1 of libray A
I want to develop project A and project B with the same development machine, but I want to use different environments for each development.
Example of reason to use properly
- library A uses different ver for each project
- I don't want to install library B in project B (because I don't want to install unnecessary things and make the process heavy, conflict with the project code, etc.)
Use pyvenv to separate the environment (required library set)
(Pip install the libraries needed for Project A)
(Pip install the libraries needed for project B)
Develop each project in the created virtual environment
- Note that librayr C ver.3.0 installed in the main Python environment that does not use pyvenv will be reflected in all virtual environments.
Library installation destination when pip install with pyvenv
Under prj_a_env / Lib / site-packages /