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.

Homebrew installation broken on Python < 3.7

See original GitHub issue

This is probably related to #2296, but I’m currently unable to upgrade pipenv past 2018.6.25 using Homebrew.

I have my Python pinned at 3.6.5 with brew switch python 3.6.5_1 && brew pin python

Because of this I have to --build-from-source for any upgrade to a brew-installed package that depends on python as the bottles are built on Python 3.7.

After brew upgrade pipenv --build-from-source I get the following error:

pipenv --help
Traceback (most recent call last):
  File "/usr/local/Cellar/pipenv/2018.10.9/libexec/bin/pipenv", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/Cellar/pipenv/2018.10.9/libexec/lib/python3.6/site-packages/pkg_resources/__init__.py", line 26, in <module>
    import zipfile
ModuleNotFoundError: No module named 'zipfile'

Switching back to 2018.6.25 resolves the issue, but it’d be nice to get on the latest version.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Samoxcommented, Dec 25, 2018

Thanks @amancevice 😃 I finally managed to make it work with pipenv. For documentation here are the steps:

  • brew uninstall pipenv
  • brew install pipenv
  • brew install python 3.6.4_4
  • Create a symlink ln -s /usr/local/Cellar/python/3.6.4_4/bin/python3 /usr/local/opt/python/bin/python3.6 because pipenv will ttry to find it here…
  • now use the destructive command pipenv shell --python /usr/local/Cellar/python/3.6.4_4/bin/python3 a new virtualenv will be created
  • You can now use pipenv cli pipenv shell or pipenv install with the python 3.6 version

@amancevice In my case I did not have to use pyenv. The only annoying thing is that you need to find where brew will install python distribution.

1reaction
uranusjrcommented, Oct 13, 2018

Closing since there isn’t really anything to track in this repo. Feel free to reopen (or raise a new issue) if cooperation from us is needed to resolve this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python@3.7 - Homebrew Formulae
python @3.7. Install command: brew install python@3.7. Interpreted, interactive, object-oriented programming language. https://www.python.org/.
Read more >
installing python@3.7 MacBook Air m1 problem - Stack Overflow
Error : python@3.7: An unsatisfied requirement failed this build. My question is that "how can I install python3.7 on MacBook Air m1 using...
Read more >
Fix Python After Brew Upgrade in MacOS - Ruddra.com
1. To install PyEnv, you can use brew: ; 2. Then clone the repository to to get the latest version of pyenv ;...
Read more >
macOS Big Sur: Python 3.7 Installation with Homebrew - return2
A step-by-step tutorial on how to install Python 3.7 on macOS Big Sur with Homebrew and fix all upcoming bugs, errors and problems...
Read more >
How to install python3.7 on a mac (mojave using homebrew
brew switch python 3.7 Error: python does not have a version "3.7" in the Cellar. python's installed versions: 3.7.6_1.
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