Pipenv install

Like others, I am having problems installing pipenv from the video https://youtu.be/BVr-6Ki96XM. None of the responses on the other threads have been helpful.

I followed the directions. But I get the error message command not found when I type pipenv --version. And I get the same error message when I type pipenv.

When I re-did the directions, I didn’t get the yellowed message after installation that talked about the PATH.

When I open my bash_profile, it only has one line in it, which surprised me because I could have sworn there were a lot of stuff in there from the line command course.

I wonder if I’m working in a different environment (I’m not sure I’m using that word right) because at some point in the line command course my prompt changed to “(base) $.”

general google searches have also been unhelpful with my limited knowledge.

feeling like I’m missing something obvious, and thanks for any help

If you close and re-open the terminal, you ought to go back to a non-virtual environment if you’ve somehow ended up in one.

If you go back in to a fresh terminal, you should be able to run the following:

$ pip show pipenv

If pipenv is installed, you’ll get something which looks like this (this is for pylint…)

$ pip show pylint
Name: pylint
Version: 2.3.1
Summary: python code static checker
Home-page: https://github.com/PyCQA/pylint
Author: Python Code Quality Authority
Author-email: code-quality@python.org
License: GPL
Location: /Users/yourname/Library/Python/3.7/bin
Requires: astroid, isort, mccabe, colorama

If pipenv isn’t installed, then pip show pipenv won’t return anything.

If there’s no reference in there to the installation path for pipenv, then that’s why you’re getting the error you’re getting.

Once you’ve confirmed whether it is actually installed, you can add the relevant path to the PATH. :slight_smile:

1 Like

Thank you.

When I typed pip show pipenv, I got something very similar to what you printed out.
Name: pipenv

Version: 2018.11.26
Summary: Python Development Workflow for Humans.
Home-page: https://github.com/pypa/pipenv
Author: Kenneth Reitz
Author-email: me@kennethreitz.org
License: MIT
Location: /Users/******/Library/Python/3.7/lib/python/site-packages
Requires: setuptools, virtualenv-clone, pip, virtualenv, certifi

The single line in my bash_profile is:

export PATH="/Users/******/Library/Python/3.7/bin:$PATH"

I still get the same errors for pipenv and pipenv --version.

Can you try logging out and back in to your computer, see if that fixes it?

(I can never remember whether ~/.bash_profile is the one that’s reloaded with each terminal or just at logon…)

Done. But no change in error messages…

If you do echo $PATH in the terminal, does the output include the bit to pipenv (/Users/******/Library/Python/3.7/bin) ?


echo $PATH does include that bit at its beginning:


also, I found the bash_profile that had all the stuff I remember it having, not the single line. I added that line to the end of it, and now it looks like this. This file was .bash_profile and the other file that had one line was bash_profile.

Setting PATH for Python 3.7

The original version is saved in .bash_profile.pysave

export PATH

alias python=“python3”
export PS1="$ "
alias pip=“pip3”

remind=echo “~/.bash_profile to reload bash. open /.bash_profile to edit bash”

added by Miniconda3 4.7.10 installer

>>> conda init >>>

!! Contents within this block are managed by ‘conda init’ !!

__conda_setup="(CONDA_REPORT_ERRORS=false '/Users/myusername/miniconda3/bin/conda' shell.bash hook 2> /dev/null)" if [ ? -eq 0 ]; then
\eval “$__conda_setup”
if [ -f “/Users/myusername/miniconda3/etc/profile.d/conda.sh” ]; then
. “/Users/myusername/miniconda3/etc/profile.d/conda.sh”
CONDA_CHANGEPS1=false conda activate base
\export PATH="/Users/myusername/miniconda3/bin:$PATH"
unset __conda_setup

<<< conda init <<<

export PATH="/Users/******/Library/Python/3.7/bin:$PATH"

I deleted the bash_profile (that had a single line).


I’m unfortunately out of ideas now; if you’ve got the export PATH bit in .bash_profile then I don’t know why it’s not working…


1 Like

Since you’ve probably created a file somewhere named pyenv you can search for that and add its directory to your path…or tell python to run that module

1 Like

A night of sleep does wonders. One of two things fixed it.
(in addition to being in .bash_profile instead of making a file called bash_profile)

Possibility 1: I needed to leave the conda environment. My hint that I was in the conda environment was my prompt, which was

(base) $

instead of


to exit conda:

conda deactivate

If this was the problem, be aware that going through the Python 3 course means you have conda activated when you get to this video.

Option 2: (seems more likely)
The line I added needed to go at the top of the .bash_profile, not the end. I didn’t/done fully understand the video’s directions about what to do if there’s already stuff in .bash_profile, but I added the new export line below the first export line (first several lines given below, my added line is last).

Setting PATH for Python 3.7

The original version is saved in .bash_profile.pysave

export PATH
export PATH="/Users/myusername/Library/Python/3.7/bin:$PATH"

I no longer get error messages for pipenv or pipenv --version.

Or maybe it was none of this and I had a typo or something that I didn’t notice when I was playing in the file this morning.

I hope this helps someone else going through the same thing.


Glad you got it working, and :+1: for coming back and posting the solution. :slight_smile:

1 Like

How did you delete the bash_profile that only had one line? I am having the same issue and having trouble locating the bash_profile with one line. Thanks.

You should be able to see it in your list of files. I’m on a Mac, so I could see it and search for it in my finder. (it was in /Users/myusername.) You can trash it from there.

Alternatively, if you’re working with the command line, use can use del filename.

bash.profile isn’t a hidden file. Those start with a . (.bash/profile)

1 Like

Thank you. I was able to find and delete it. Interesting that the instructions led us both to that empty bash_profile. I still don’t understand why, but it’s working now.

1 Like

I tried and tried but can’t run piping or piping --version. I’ve uninstalled and installed again copied the path but it doesn’t work. Any thoughts?

EDIT: ok. I managed to run pipenv, but to run, every time I open terminal I need to type “source ~/.bash_profile”. Any idea on how can I fix it so I don’t need to run source every time?

I’m having the same difficulties. Would using a different installer such as homebrew have an effect? Also i’m pretty sure I’m no longer using bash but zshell. How would I proceed?

Thank you

It depends on what you’re using. If you’re using Mac Catalina, you’ll need to update the .zprofile. You can get here by going to finder, hold shift, hover over “Go” in the top bar, select “Select startup disk”, then hold shift + command + “.” to show hidden files, then go to Users -> {username} -> edit .zprofile.

You can basically copy and paste any existing records, then make sure for PATH="…", ensure the path includes “/Users/{username}/”, not just “Library/Python/…”. That had me editing things for another 20 minutes to figure it out.

Hope that helps.


I had the same problem, I was in the wrong directory.

hello , I have pipenv installed . I had downloaded anaconda navigator .

whenever I try to use pipenv code it says it is not recognised as internal or external command but when I install it is showing requirement already satisfied …

Hi, welcome to the forums.

Sounds like wherever pipenv is installed is not included in the PATH environment variable. That being said, if you’ve got Anaconda installed I’m guessing you might have also used conda to install pipenv? In which case, you could potentially just use the Anaconda Terminal? That might solve your problem. :slight_smile: