Home > Net >  Python: How to setup virtuel enviroment?
Python: How to setup virtuel enviroment?

Time:01-10

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?

CodePudding user response:

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

CodePudding user response:

Try:

python -m pipenv install django
  •  Tags:  
  • Related