Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. But, I want to use pipenv on Python 3.6, so I ran $ brew switch python 3.7 3.6.5 and then when I tried $ pipenv install an error appeared as follow:

dyld: Library not loaded: @executable_path/../.Python
  Referenced from: /usr/local/Cellar/pipenv/2018.11.26/libexec/bin/python3.7
  Reason: image not found
Abort trap: 6

Is there any solution to install pipenv along with Python 3.6.5?

Thank you.

like image 576
Satrio Adi Prabowo Avatar asked Dec 17 '22 19:12

Satrio Adi Prabowo


2 Answers

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
like image 178
gavinest Avatar answered Jan 01 '23 22:01

gavinest


Try this, but first install python 3.6.5

pipenv --python 3.6.5
like image 37
Alex Avatar answered Jan 01 '23 22:01

Alex