Skip to content Skip to sidebar Skip to footer

Install Pipenv Using Brew On Python 3.6

I am trying to install pipenv using Homebrew as suggested in here. First, I ran $ brew install pipenv. Then, brew install python 3.7 automatically and I can use pipenv properly. Bu

Solution 1:

I had the same issue and spent a long time researching. In the end I determined my project did not absolutely need python3.6 so I switched brew to python3.7 and reinstalled pipenv.

If you absolutely need to use pipenv with python3.6 then you may find this thread helpful but to me it seemed like a nuclear option I didn't want to go through.

How to move back to using pipenv with python3.7:

# get your version of python3.7
brew list --versions python

# switch to your python3.7 version
brew switch python 3.7.x_x 

# install pipenv if it was removed during the troubleshooting process
brew install pipenv

# pipenv should work now
pipenv --help

Solution 2:

Try this, but first install python 3.6.5

pipenv --python3.6.5

Solution 3:

You can always install using your specific Python using pip:

python3 -m pip install --user pipenv

python3, here assumes your 3.6.5, if not then use the whole path to your desired Python.

Solution 4:

https://github.com/pypa/pipenv/issues/2965

Make sure you're using python3.6

$ python
Python 3.6.5 (default, Jun 17 2018, 12:13:06)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license"for more information.
>>>

$ brew switch python # if not, see your versions
Error: Usage: brew switch <formula> <version>
python installed versions: 3.6.5_1, 3.7.3

$ brew switch python 3.6.5_1 # change your version if is necessary
Cleaning /usr/local/Cellar/python/3.6.5_1
Cleaning /usr/local/Cellar/python/3.7.3
25 links created for /usr/local/Cellar/python/3.6.5_1

Install pipenv 2018.6.25

$ brew unlink pipenv$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/2c0bbfa297e2429cd6e080ad5231f3aa56ff4f65/Formula/pipenv.rb

Change to pipenv 2018.6.25

$ brew switch pipenv 2018.6.25

Solution 5:

Had the same issue after upgrading OSX version.

Solved by uninstalling homebrew installation and following the "Pragmatic Installation" instructions:

brew uninstall pipenv
pip install --user pipenv

If you get pipenv: command not found, add the user base’s binary directory to your PATH per the instructions, for OSX add this to your ~/.bash_profile:

export PATH=/Users/YOUR_USER_NAME/.local/bin:$PATH

Post a Comment for "Install Pipenv Using Brew On Python 3.6"