Homebrew installation broken on Python < 3.7
See original GitHub issueThis 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:
- Created 5 years ago
- Reactions:2
- Comments:16 (4 by maintainers)
Top 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 >
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 Free
Top 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
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
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…pipenv shell --python /usr/local/Cellar/python/3.6.4_4/bin/python3
a new virtualenv will be createdpipenv shell
orpipenv 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.
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.