Pipenv: command not found

(In Windows)
I’ve installed pipenv, made the storefront directory, gone to “bash: pipenv install django” and I just keep getting this error “bash: pipenv: command not found”

I ran “pip list”
$ pip list
Package Version


asgiref 3.4.1
backports.entry-points-selectable 1.1.1
certifi 2021.10.8
distlib 0.3.3
Django 3.2.9
filelock 3.4.0
pip 21.3.1
pipenv 2021.11.23 <-----
platformdirs 2.4.0
pytz 2021.3
six 1.16.0
sqlparse 0.4.2
virtualenv 20.10.0
virtualenv-clone 0.5.7

someone else posted awhile back having this same problem and someone said it was because there was no path to the python folder but didn’t explain how o fix it. I found another guide online but not sure if it’s in there right

Had this problem a long time ago on another computer. Ended up quitting this course and finding another one. Would rather not do that again. Help. Thanks :slight_smile:

Run pip show pipenv . Check the location and add that to the top of your Path environment variable.

Thank you for answering but… still having the same problem

  1. What’s the Location field you get when you run pip show pipenv
  2. Does your Path environment in User variable have that path?
  3. Try running pipenv install using power, what do you see?

You gotta tell what you tried to solve the problem.

I added the location to user variables and tried to install django. Same result as before “pipenv command not found” I also tried a different command (pipenv --python) just to see if it would change anything and it didn’t
I did the same process in powershell and command got the same return ‘pipenv not found’

Okay, if you’ve installed your Python via Windows Store, then remove it completely.
Install Python from the official site Download Python | Python.org
(Python installed via Windows Store may create issues regarding path)

Now, install pipenv again and see if the same problem occurs.

If so, find where Python is installed using this command

python -c "import os, sys; print(os.path.dirname(sys.executable))"

Now go that folder and check if you have Scripts folder. In there, check if you have pipenv.exe.
If it exists, then add the path to the Scripts folder to the user’s Path environment variable.
(Don’t create a new one append it to the Path, then move it to the top)

If all of these fails, I really don’t know how you can fix it.

For anyone having the same issue just try this:

sudo -H pip install -U pipenv

or

sudo -H pip3 install -U pipenv

and then try: pipenv install django

Not an expert but worked for me :slight_smile:

edit : solution to other possible followup errors.

On mine after typing sudo -H pip install -U pipenv it’s asking me for password but I have no clue which password I am meant to use.