I'm using vscode, and my editor shows:
The red is showing that it can't import those packages. I'm using a pipenv
virtual environment and for the life of me, I can't figure out where it installs the packages.
If I could, I could just add that to $PYTHONPATH
and life would be better.
Any help?
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. If you open up this in the file explorer, you'll find exactly where the modules are being installed.
Discover the proper executable path as described in the pipenv installation procedure and enter the target string in the Pipenv executable field, for example: C:\Users\jetbrains\AppData\Roaming\Python\Python37\Scripts\pipenv.exe (Windows) or /Users/jetbrains/. local/bin/pipenv (macOS).
$ pipenv install is used for installing packages into the pipenv virtual environment and updating your Pipfile. The user can provide these additional parameters: --two — Performs the installation in a virtualenv using the system python2 link.
pipenv installs packages in ~/.local/share/virtualenvs/
To find the complete path, run pipenv --venv
On windows machines start pipenv pipenv shell
then where python
to get the path to your scripts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With