The following guides will help you get Python and Pip
This is a great overview of Pipenv and Virtual Environments
Install Pipenv with pip
$ pip install pipenv
Create a project root directory
mkdir python-example && cd python-example
Create a virtual environment in the directory:
pipenv --python 3.5
Install project level dependencies as needed.
Pipenv will automatically add the dependency to the [packages] section in the Pipfile. In addition, Pipenv creates a file named Pipfile.lock, which contains a hash of the exact versions used. This ensures that when other developers install the dependencies for this project, they will all end up with exactly the same versions.
This will install the pytest library as a dependency
pipenv install --dev 'pytest>=3.*'
Now the virtual environment has been created which will be used to run your Python code isolated from other python environments and with it's own modules and interpeter. You will still need to activate this environment in any shell you are working in.
From within the directory containing the Pipfile, start a shell in the new environment:
pipenv shell
This is similar to running source env/bin/activate with virtualenv.
Exit the shell (similar to deactivating an environment with virtualenv):
exit
Locate the binary for the virtual environment:
pipenv --venv
This is handy for locating the correct settings for development in pyCharm or Intellij IDE(s)
Create a new project using Python 3.7, specifically:
$ pipenv --python 3.7
Remove project virtualenv (inferred from current directory):
$ pipenv --rm
Install all dependencies for a project (including dev):
$ pipenv install --dev
Create a lockfile containing pre-releases:
$ pipenv lock --pre
Show a graph of your installed dependencies:
$ pipenv graph
Check your installed dependencies for security vulnerabilities:
$ pipenv check
Install a local setup.py into your virtual environment/Pipfile:
$ pipenv install -e .
Use a lower-level pip command:
$ pipenv run pip freeze