-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Python fails to build core extension modules on Xcode-only 10.11 #41085
Comments
Same here. |
What command did you use to install Python? What's |
first brew reinstall python then uninstall and install command output = /Applications/Xcode-beta.app/Contents/Developer |
@shaneburrell, can you paste logs with Does switching the active Xcode configuration to the Command Line Tools ( |
I only have Xcode 7 installed. gist-log to follow in a min or two. |
It looks like python's setup.py is failing to detect the libraries and is refusing to even attempt to build them. It would be nice to be able to send a patch for this upstream. |
When switching to the command line tools using |
I don't see this on a system with freshly installed CLT and Xcode 7 Beta 2. I'll try Xcode-only later. |
I'll try with Beta 2 in a bit I was using Beta 1. |
I could have sworn I had Beta 2 installed already... Downloading now and will report back once installed. |
ok confirmed for me, same issues with Beta 2 |
[edit: my belief is that this is not true -@tdsmith] Dive into
you can see the filename extension of libz* is "tbd" So we should switch to the stable version of CLT and reinstall python:
|
I was able to build 2.7.10_1 on a system
|
I was able to just |
@mikestecker: Are you still having trouble? |
I was having this same problem when using Xcode 7 beta 7A121I with the current 10.11 beta (15A216g). After upgrading to Xcode 7 beta 7A152u, I was able to successfully build and install both Python 2.7.10_1 and Python 3.4.3_1. |
@tdsmith I found my Xcode 7 is beta 2 (7A121I) |
The .tbd files are functional; see https://forums.developer.apple.com/message/8609#8609. Many people have successfully built the Python extension modules with Xcode 7 on El Capitan. I haven't seen anything pointing to an Xcode problem or insufficiency. |
@tdsmith Thanks for the link, learned something new from the forum. :) So there is no libz.dylib in it Xcode anymore after Xcode 6, right? Yesterday I ran python, which was updated a few day ago (built with Xcode 7 beta CTL), and it told me
and found no libz.dylib in there. So I switch to the CTL for Xcode 6.4, in which I can find the libz.dylib. And after reinstalling python, everything went well. Today I updated Xcode 7 to beta 3 (with no libz.dylib in it too) and ran
Then I made a reinstallation of python using I think the libz.dylib is needed for the extension modules while building python. |
Same issue here, with Xcode 7 beta 3. |
Did any of you having
For the record, the |
Solution (Xcode 7 beta 3):
xcode-select --install |
Solution of @vyazovoi looks like it works well. |
Thanks @vyazovoi! |
This "should" work without the CLT installed but I'm not sure why it fails; I haven't had a chance to build a VM against the most recent 10.11 beta. |
Just throwing my two cents in here, I can't get this to work at all with the El Capitan GM paired either with the latest command line tools installed with |
Same here with 10.11 GM + Xcode 7.0 GM. I also tried to locate the file with brew cat python | grep zlib ..if i jump to the folder there is a /usr/include/zlib.h |
Same here w/ 10.11 GM + Xcode 7.1 beta. |
10.11 Beta 6 + Xcode 7.1 beta also failing here, except for python3 (3.5.0). https://gist.github.com/anonymous/6d3caeeb0e48c7182fb3 However, it does succeed after the @paulelms solution posted above. |
Added a note to the top comment for easy discoverability:
|
As stated in my comment: #41085 (comment) It doesn't work for me using the CLT package. :( |
I saw, but without more insight into the root cause it seemed helpful to point out the CLT installation as a workaround because there's positive signal that it helps some (most?) people. :/ Can you post the output of |
Will do when I get back to my El Capitan computer. :) |
well, I'm sure I also tried it yesterday, but today (now on Xcode 7.1): brew update
Updated Homebrew from b4537f12 to 8a6e49d9.
==> New Formulae
gxml
==> Updated Formulae
bitrise jetty libgee nghttp2 py3cairo python3
ffmpeg keepassc libtiff pastebinit pyenv treeline
gnutls lensfun mypy ponysay pyqt5 xonsh
==> Deleted Formulae
honeyd python -V
Python 2.7.10 Thanks |
Ok, yeah, weird. Today it works for me too using the CLT packages. 💻 |
The problem is that python's setup.py wants to find the library on disk before it tries to build anything, it only looks inside the Xcode sysroot (if a sysroot is specified), it's looking for a .dylib, and the SDK only has the .tbd file. This patch extends distutils to find the stubs: https://gist.github.com/tdsmith/015536712a6c0e4b2e5d |
Upstream report: https://bugs.python.org/issue25136 |
Fixes #41085. Closes #44245. Signed-off-by: Tim D. Smith <[email protected]>
I know I'm running a beta, but wanted to report this anyway.
Python fails during the postinstall phase:
I have the latest Xcode beta installed:
Here is the output of running
brew gist-logs python
https://gist.github.com/dc7662dba10b070d2336[edit @tdsmith Sep 14 2015: Installing the Command Line Tools with
xcode-select --install
should let you work around this. I would like this to work without the CLT package but won't have time to investigate for a bit; community efforts are welcome!]The text was updated successfully, but these errors were encountered: