Python PipeNV

I watched this video: https://www.codecademy.com/paths/computer-science/tracks/cspath-python-objects/modules/cspath-modules/videos/learn-python3-pipenv

and am having trouble connecting to the path correctly. What am I doing wrong? I followed all the Mac instruction but when i go check the path installed by typing “more ~/.bash_profile”, it gives me this:


# Setting PATH for Python 3.5

# The orginal version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"

export PATH

# Setting PATH for Python 3.5

# The orginal version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"

export PATH

# Added by install_latest_perl_osx.pl

[ -r /Users/Kaamen/.bashrc ] && source /Users/Kaamen/.bashrc

# Setting PATH for Python 3.6

# The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"

export PATH

# Setting PATH for Python 3.6

# The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"

export PATH

/Users/Kaamen/.bash_profile (END)

and when i go close my terminal and re-open and type in “pipenv --version”, the command isn’t found: “-bash: pipenv: command not found”.

It’d be worth finding out what is on your path within your terminal session, something like echo $PATH in the terminal should provide you with that information. If your additions aren’t included then there’s something wrong.

On that note, you mention instructions for mac osx? The default shell for OSX with Catalina (if you’ve updated to it) is now zsh instead of bash. Altering your bash profile would not affect the environment of your terminal if it defaults to zsh (if you need to check the shell echo $SHELL should be set correctly).

If you are running zsh as the default shell you’d need to alter the .zsh files instead to properly set up your environment with a given path. I think the standard one to alter/create would be .zshrc but it’s worth double checking as OSX is sometimes a bit odd when it comes to the terminal (worth a quick online search).

1 Like