neldelesndblogtagscontactresume
neldelesndblogtagscontactresume

2020 September 2ndTroubleshooting Pipenv Install on OSXpythonosxpipenv 

User installation of pipenv.


I was able to successfully install pip env via pip3 install --user pipenv.

However, when I run the command pipenv install in a fresh root project directory I receive the following message: -bash: pipenv: command not found.

To fix, need to follow the official instructions found here.

The exact commands I used were:

PYTHON_BIN_PATH="$(python3 -m site --user-base)/bin" PATH="$PATH:$PYTHON_BIN_PATH"

However, you will need to always run those commands whenever opening a new Terminal window. To make the change permanent, you can add the path to /etc/paths.

First, identify the path via: python3 -m site --user-base. Then append /bin to that path. This is the path you will add to the /etc/paths file.

Proceed w the following steps as found here:

  • Open up Terminal.

  • Run the following command:

    sudo nano /etc/paths
  • Enter your password, when prompted.

  • Go to the bottom of the file, and enter the path you wish to add.

  • Hit control-x to quit.

  • Enter “Y” to save the modified buffer.

  • That’s it! To test it, in new terminal window, type:

    echo $PATH

You should see something similar to this (including the path you’ve added!):

MacMini:~ ryan$ echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/share/npm/bin

Sources:

https://stackoverflow.com/questions/46391721/pipenv-command-not-found

https://stackoverflow.com/questions/22465332/setting-path-environment-variable-in-osx-permanently