'Where does pipenv install packages?
Solution 1:[1]
pipenv installs packages in ~/.local/share/virtualenvs/
To find the complete path, run pipenv --venv
Solution 2:[2]
On windows machines start pipenv pipenv shell then where python to get the path to your scripts
Solution 3:[3]
I spent like 2 hours trying to figure out what I was doing wrong (the files would run but the imports would not resolve). Turns out it's surprisingly simple.
Go to the root of your project & open up a new terminal. Use the following commands to open a shell and get the location of the virtual environment.
>>> pipenv shell
>>> pipenv --venv
C:\Users\gasma\.virtualenvs\dungeon-generator-MV179gUf
If you open up this in the file explorer, you'll find exactly where the modules are being installed.
From here, you can create a new .vscode/settings.json file (still in your project directory) to let VS Code know what's up.
In my case, I typed this in:
{
"python.autoComplete.extraPaths": ["C:/Users/gasma/.virtualenvs/dungeon-generator-MV179gUf/Lib/site-packages"],
"python.analysis.extraPaths": ["C:/Users/gasma/.virtualenvs/dungeon-generator-MV179gUf/Lib/site-packages"]
}
Make sure your replace the file paths with the one you got from running pipenv --venv. To run your project, just use python <file>.py, and to exit the virtual environment, simply type exit.
Solution 4:[4]
/Users//.local/share/virtualenvs//lib/python3.9/site-packages
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 | |
| Solution 2 | Isaac Sekamatte |
| Solution 3 | Ad Charity |
| Solution 4 | feng |


