Installation

# Open command line in an administratormode
pip uninstall virtualenv
pip uninstall pipenv
pip install pipenv

Usage

# Make venv
pipenv install --python 3.11
 
# Open venv
pipenv shell
 
# Install packages
pipenv install pandas numpy ...
 
# Install packages for dev env
pipenv install --dev pytest
 
# Unnstall packages
pipenv uninstall pandas numpy ...
 
# Exit venv
exit
 
# Remove venv
pipenv --rm

Construct venv from pipfile

pipenv install

Move or Rename a Directory

# Befor change
pipenv --rm
# After change
pipenv install

Export to requirements.txt

pipenv lock -r
pipenv lock -r --dev

Change default venv Location

Checking current venv location setting

pipenv --venv

Set the environmental variable WORKON_HOME

# For Linux
export WORKON_HOME=~/.venvs
 
# For Windows
setx WORKON_HOME C:\pipenv

Use Alternate Package Index

Add the package index to the pipfile instead of specifying the package index URL when installing (--index-url https://download.pytorch.org/whl/cu124).

[[source]]
url = "https://download.pytorch.org/whl/cu124"
verify_ssl = false
name = "pytorch"
pipenv install torch --index=pytorch