Nick
Nick

Reputation: 219

Python: How to setup virtuel enviroment?

I'm trying to set up a virtual environment for my Python + Django project, so I ran the following in my terminal:

pip3 install pipenv

Afterward while being in my folder I tried doing this

pipenv install django

but I keep getting this error, and I have no idea how to solve it. Not sure if this makes a difference but i work in VScode

zsh: command not found: pipenv

Any ideas on how to solve this problem?

Upvotes: 0

Views: 69

Answers (2)

zotil
zotil

Reputation: 36

With venv module

  1. Create a virtual environment with venv
python3 -m venv .venv
  1. Set as active environment:
source .venv/bin/activate
  1. Install django:
pip install django

Upvotes: 1

FormulaRossa
FormulaRossa

Reputation: 28

Try:

python -m pipenv install django

Upvotes: 0

Related Questions