When I upgrade Python version by homebrew, pipenv die.
See original GitHub issueIssue description
First of all, I have Python 3.6 in my mac, this Python was installed by homebrew.
I installed pipenv by this command:
python3 -m pip install pipenv
now, I upgrade Python3 to Python 3.7 by the following command:
brew upgrade python3
brew cleanup
Now, pipenv has dead.
when I run command pipenv
, it will raise the error msg:
$ /usr/local/bin/pipenv
zsh: /usr/local/bin/pipenv: bad interpreter: /usr/local/opt/python/bin/python3.6: no such file or directory
Expected result
Pipenv work.
Actual result
$ /usr/local/bin/pipenv
zsh: /usr/local/bin/pipenv: bad interpreter: /usr/local/opt/python/bin/python3.6: no such file or directory
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
"Library not loaded" error after upgrade python with Homebrew
I use pipenv to create virtualenv like this
Read more >pipenv - Homebrew Formulae
pipenv. Install command: brew install pipenv. Python dependency management tool ... Formula JSON API: /api/formula/pipenv.json ... Current versions: ...
Read more >pipenv Documentation - Read the Docs
Generates and checks file hashes for locked dependencies when installing from Pipfile.lock. • Automatically install required Python version when pyenv is ...
Read more >The Right Way to Set Up Python on Your Mac | by Dirk Avery
Step 1. Get Homebrew · Step 2. Handle Non-Homebrew Python · Step 3. Set Up the Environment · Step 4. Install Python ·...
Read more >Install Python: Detailed Instructions for Window, Mac, and Linux
Homebrew packages are usually very up-to-date. It's also easy to upgrade to newer versions later on. However, you do need to be comfortable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So wait, the first recommendation in the README is not the best way to install pipenv? That seems like a problem.
In any case, I solved this by doing
brew install --force pipenv
thenbrew link --overwrite pipenv
to do a reinstall.I fixed this by manually updating my /usr/local/bin/pipenv file.
I met this problem after upgrading from 3.7 to 3.8.
I edited /usr/local/bin/pipenv file and changed
#!/usr/local/opt/python/bin/python3.7
to
#!/usr/local/opt/python/bin/python3.8
which seemed to fix the issue, for me