question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When I upgrade Python version by homebrew, pipenv die.

See original GitHub issue

Issue 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:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

34reactions
mAAdhaTTahcommented, Aug 7, 2020

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 then brew link --overwrite pipenv to do a reinstall.

4reactions
m0j0hncommented, Jul 24, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found