Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.7 Upgrade fails #29604

Closed
6 tasks done
LanikSJ opened this issue Jun 30, 2018 · 16 comments
Closed
6 tasks done

Python 3.7 Upgrade fails #29604

LanikSJ opened this issue Jun 30, 2018 · 16 comments
Labels
outdated PR was locked due to age

Comments

@LanikSJ
Copy link
Contributor

LanikSJ commented Jun 30, 2018

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • have a problem with brew install (or upgrade, reinstall) a single, official formula (not cask)? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

  • What you were trying to do (and why)
    I ran brew upgrade, which broke Python and I'm not able to install awscli which also depends on Python.
  • What happened (include command output)
○ → brew install --build-from-source python
==> Downloading https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
Already downloaded: /Users/me/Library/Caches/Homebrew/python-3.7.0.tar.xz
==> ./configure --prefix=/usr/local/Cellar/python/3.7.0 --enable-ipv6 --datarootdir=/usr/local/Cellar/python/3.7.0/share --datadir=/usr/local/Cellar/python/3.7.0/share --enable-framework=/usr/local/Cellar/python/3.7.0/Frameworks --enable-loadable-
==> make
==> make install PYTHONAPPSDIR=/usr/local/Cellar/python/3.7.0
==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python/3.7.0/share/python
==> Downloading https://files.pythonhosted.org/packages/1a/04/d6f1159feaccdfc508517dba1929eb93a2854de729fa68da9d5c6b48fa00/setuptools-39.2.0.zip
Already downloaded: /Users/me/Library/Caches/Homebrew/python--setuptools-39.2.0.zip
==> Downloading https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz
Already downloaded: /Users/me/Library/Caches/Homebrew/python--pip-10.0.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/2a/fb/aefe5d5dbc3f4fe1e815bcdb05cbaab19744d201bbc9b59cfa06ec7fc789/wheel-0.31.1.tar.gz
Already downloaded: /Users/me/Library/Caches/Homebrew/python--wheel-0.31.1.tar.gz
==> make html
==> /usr/local/Cellar/python/3.7.0/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.0/bin --install-lib=/usr/local/lib/python3.7/site-packages --single-version-externally-managed --reco
==> /usr/local/Cellar/python/3.7.0/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.0/bin --install-lib=/usr/local/lib/python3.7/site-packages --single-version-externally-managed --reco
==> /usr/local/Cellar/python/3.7.0/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.0/bin --install-lib=/usr/local/lib/python3.7/site-packages --single-version-externally-managed --reco
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
  brew install python@2

Pip, setuptools, and wheel have been installed. To update them run
  pip3 install --upgrade pip setuptools wheel

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python/3.7.0: 9,332 files, 160.1MB, built in 5 minutes 4 seconds

○ → pip3
Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 11, in <module>
    load_entry_point('pip==10.0.1', 'console_scripts', 'pip3')()
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2318, in load
    return self.resolve()
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2324, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.7/site-packages/pip/_internal/__init__.py", line 20, in <module>
    from pip._vendor.urllib3.exceptions import DependencyWarning
  File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/connectionpool.py", line 36, in <module>
    from .response import HTTPResponse
  File "/usr/local/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 3, in <module>
    import zlib
ModuleNotFoundError: No module named 'zlib'
  • What you expected to happen
    Functioning Python 3.
  • Step-by-step reproduction instructions (by running brew install commands)
    brew install --build-from-source awscli

If it helps I also have the gist from install awscli: https://gist.github.com/LanikSJ/ee973ba24c0a5beb8730494a91a85087

@minusf

This comment has been minimized.

@ilovezfs

This comment has been minimized.

@minusf

This comment has been minimized.

@minusf

This comment has been minimized.

@dhaynespls
Copy link

Bumping all around. Upgrading or installing python causes the zlib import to fail when working with any package installations. I have the xcode tools installed and manually installed zlib but that did not fix the problem.

@ilovezfs

This comment has been minimized.

@ilovezfs
Copy link
Contributor

ilovezfs commented Jul 1, 2018

@dhaynespls seems fine here:

$ python3
Python 3.7.0 (default, Jun 29 2018, 20:13:13) 
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
>>>

@ilovezfs
Copy link
Contributor

ilovezfs commented Jul 1, 2018

@LanikSJ @dhaynespls do you have the gist logs for python?

@dhaynespls
Copy link

My immediate thought is to blame macOS 10.14 but I don't know if OP was on it or not.

@ilovezfs
Copy link
Contributor

ilovezfs commented Jul 1, 2018

Yes it sounds the same as #29176

@ilovezfs
Copy link
Contributor

ilovezfs commented Jul 1, 2018

Can you try the fix from #29176 (comment)

@dhaynespls
Copy link

In the process of doing so!

@dhaynespls
Copy link

Confirmed fix:

~> brew update
Already up-to-date.

~
~> installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
installer: Must be run as root to install this package.

~
~> sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Password:
installer: Package name is macOS_SDK_headers_for_macOS_10.14
installer: Installing at base path /
installer: The install was successful.

~ 1m
~> brew reinstall python
==> Reinstalling python
==> Downloading https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
Already downloaded: /Users/dhaynes/Library/Caches/Homebrew/python-3.7.0.tar.xz
==> ./configure --prefix=/usr/local/Cellar/python/3.7.0 --enable-ipv6 --datarootdir=/usr/local/Cellar/python/3.7.0/share --datadir=/usr/local/Cellar/python/3.7.0/share --enable-framework=/usr/local/Cellar/pyt
==> make
==> make install PYTHONAPPSDIR=/usr/local/Cellar/python/3.7.0
==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python/3.7.0/share/python
==> Downloading https://files.pythonhosted.org/packages/1a/04/d6f1159feaccdfc508517dba1929eb93a2854de729fa68da9d5c6b48fa00/setuptools-39.2.0.zip
Already downloaded: /Users/dhaynes/Library/Caches/Homebrew/python--setuptools-39.2.0.zip
==> Downloading https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz
Already downloaded: /Users/dhaynes/Library/Caches/Homebrew/python--pip-10.0.1.tar.gz
==> Downloading https://files.pythonhosted.org/packages/2a/fb/aefe5d5dbc3f4fe1e815bcdb05cbaab19744d201bbc9b59cfa06ec7fc789/wheel-0.31.1.tar.gz
Already downloaded: /Users/dhaynes/Library/Caches/Homebrew/python--wheel-0.31.1.tar.gz
==> make html
==> Not running post_install as we're building a bottle
You can run it manually using `brew postinstall python`
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
  brew install python@2

Pip, setuptools, and wheel have been installed. To update them run
  pip3 install --upgrade pip setuptools wheel

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python/3.7.0: 8,867 files, 153.8MB, built in 5 minutes 31 seconds

~ 5m 33s
~> python3
Python 3.7.0 (default, Jul  1 2018, 10:32:07)
[Clang 10.0.0 (clang-1000.10.25.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
>>>

I should have probably grepped all issues instead of jumping to the first open one I saw lol. I'm certain OP is on 10.14 as well so it's probably fair to close this. Thanks!

@ilovezfs
Copy link
Contributor

ilovezfs commented Jul 1, 2018

Thanks for confirming the fix @dhaynespls

@ilovezfs ilovezfs closed this as completed Jul 1, 2018
@LanikSJ
Copy link
Contributor Author

LanikSJ commented Jul 1, 2018

Thank you @ilovezfs worked like a charm. Put me down for the fail to read column too.

@lock lock bot added the outdated PR was locked due to age label Jul 31, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

4 participants