Are virtual environments created in a directory with the same name in venv the same environment?

Asked 1 years ago, Updated 1 years ago, 78 views

I'm going to build using Windows powershell.
When you create a virtual environment file with the same name in two types of files: Desktop\file1\env and Desktop\file2\env,
file1\env\Scripts\python.exe... ffile2\env\Scripts\python.exe... ②
If we give the same name, will we have the same virtual environment?(For example, when module A is added to に, module A is added to にも.)

python python3 python-venv

2022-09-30 17:02

1 Answers

It will be a different virtual environments.Therefore, the package is separate.

Note: After you actually create each environment and activate, you can run the following one liner to see what the current python belongs to.

python3-c "import sys,os;print(os.path.dirname(sys.executable)))"


2022-09-30 17:02

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.