Codecademy Forums

Pipenv install

Like others, I am having problems installing pipenv from the video 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
Author: Python Code Quality Authority
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.
Author: Kenneth Reitz
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/” ]; then
. “/Users/myusername/miniconda3/etc/profile.d/”
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