I\'m new to Python development and attempting to use pipenv. I ran the command pip install pipenv
, which ran successfully:
...
Successfully buil
This fixed it for me:
sudo -H pip install -U pipenv
OSX GUYS, OVER HERE!!!
As @charlax answered (for me the best one), you can use a more dynamic command to set PATH, buuut for mac users this could not work, sometimes your USER_BASE path got from site is wrong, so you need to find out where your python installation is.
$ which python3
/usr/local/bin/python3.6
you'll get a symlink, then you need to find the source's symlink.
$ ls -la /usr/local/bin/python3.6
lrwxr-xr-x 1 root wheel 71 Mar 14 17:56 /usr/local/bin/python3.6 -> ../../../Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
(this ../../../
means root)
So you found the python path (/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
), then you just need to put in you ~/.bashrc as follows:
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.6/bin"
That happens because you are not installing it globally (system wide). For it to be available in your path
you need to install it using sudo
, like this:
$ sudo pip install pipenv
I tried this:
python -m pipenv # for python2
python3 -m pipenv # for python3
Hope this can help you.
I have same problem with pipenv
on Mac OS X 10.13 High Seirra, another Mac works just fine. I use Heroku to deploy my Django servers, some in 2.7 and some in 3.6. So, I need both 2.7 and 3.6. When HomeBrew install Python, it keeps python
points to original 2.7, and python3
points to 3.6.
The problem might due to $ pip install pipenv
. I checked /usr/local/bin and pipenv isn't there. So, I tried a full uninstall:
$ pip uninstall pipenv
Cannot uninstall requirement pipenv, not installed
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ pip3 uninstall pipenv
Skipping pipenv as it is not installed.
Then reinstall and works now:
$ pip3 install pipenv
Collecting pipenv
If you've done a user installation, you'll need to add the right folder to your PATH
variable.
PYTHON_BIN_PATH="$(python3 -m site --user-base)/bin"
PATH="$PATH:$PYTHON_BIN_PATH"
See pipenv's installation instructions