Clone / create project repository:
$ cd myproject
Install from Pipfile, if there is one:
$ pipenv install
Or, add a package to your new project:
$ pipenv install <package>
This will create a Pipfile if one doesn’t exist. If one does exist, it will automatically be edited with the new package you provided.
Next, activate the Pipenv shell:
$ pipenv shell
$ python --version
This will spawn a new shell subprocess, which can be deactivated by using exit.
To create a new virtualenv, using a specific version of Python you have installed (and on your PATH), use the --python VERSION flag, like so:
Use Python 3:
$ pipenv --python 3
Use Python3.6:
$ pipenv --python 3.6
Use Python 2.7.14:
$ pipenv --python 2.7.14
After you've created a pipenv environment, add the location of your environments python executable to the VSCode settings.json file
Get your pipenv executable location:
pipenv --py
Copy and paste that location into your settings.json file:
{
"python.pythonPath": "<<PATH_FROM_ABOVE>>"
}
https://www.benjaminpack.com/blog/vs-code-python-pipenv/
https://pipenv.kennethreitz.org/en/latest/basics/
https://realpython.com/pipenv-guide/#example-usage