Search code examples
pythonpython-3.xmacospipenvpipenv-install

zsh: command not found: pipenv


even after installing pipenv 3x it is not working on my mac. If I use the command "python3 -m pipenv --version" I CAN see that it is installed (see below), however, if I go with "pipenv --version" the command is not found. My guess is that I messed something up with the path. Any idea how to solve this? thanks in advance!

zsh output below

user@users-MacBook-Air ~ % python3 --version
Python 3.11.4
user@users-MacBook-Air ~ % pip3 --version
pip 23.1.2 from
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip (python 3.11)
user@users-MacBook-Air ~ % python3 -m pipenv --version
pipenv, version 2023.7.4
user@userss-MacBook-Air ~ % 
user@userss-MacBook-Air ~ % pipenv --version           
zsh: command not found: pipenv

my steps:

  • installed pipenv via pip with pip3 install --user pipenv
  • uninstalled twice
  • set the path with vi to "export PATH="/Users/user/Library/Python/3.11/bin:$PATH"

Solution

  • using the --user is your mistake. After messing around in terminal, it told me that using it doesn't save it to a proper path. What worked for me was:

    pip3 uninstall pipenv
    y
    pip3 install pipenv
    

    this way your mac will automatically save it to a path