'Requirement already satisfied but in another env - python env configuration
Even if I've enough experience with Python & VScode, I often get this major misunderstanding. For example, I have two projects
Project1_folder
.env1
manage.py
Project6_folder
.env6
manage.py
even if I get into env6, and try to install a module xxx
(.env6) PS C:\Project6> pip install xxx
I got the statement saying
Requirement already satisfied: xxx in c:\Project1\.env1\lib\site-packages
I want it to be installed in the env6, I didn't open the project 1, it's an old project but I don't understand why in terminal/vscode i get this mixing up
The module I wanna install is django-rest-framework
Solution 1:[1]
When you do not specify the download path, it will retrieve whether the same package exists, and then download it to the default path.
You can use the following code to download to the specified directory:
pip install -t "path" django-rest-framework #path refers to the folder where you store the package in env6
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MingJie-MSFT |
