-
Notifications
You must be signed in to change notification settings - Fork 85
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
pip install fails on MacOS with Apple system Python 3.8 #1337
Comments
Thanks for the report. Do you have the |
Confirmed that I can reproduce locally on macOS 10.15.7 (19H2), with XCode 12.1 (12A7403), using these commands:
|
It looks as though this is the same issue: gorakhargosh/watchdog#689. From the discussion there, sounds as though this is an XCode issue, or possibly a core Python issue that's already been resolved at some point between Python 3.8.2 and Python 3.8.5. |
A workaround (confirmed working here) is to install with:
I'm going to close here, since I don't think there's any Traits-specific action to take. This seems to be entirely an issue with the XCode distribution of Python, which apparently tries to compile extensions using |
A quick experiment in #1338 seems to show no problems with the build with either XCode 12.0.1 or XCode 12.2 (which I think is a beta). That gives me some hope that the underlying XCode issue will be fixed with the XCode 12.2 release. But if it persists with that and later releases, we may need to consider either documenting the |
Thanks @mdickinson for looking into this. I do not have Any suggestions as to why the workaround above that worked for you might not be working in my system? Is there a development version of |
OK, I was able to build |
@hirani Thanks for the update. I'm going to re-open this, at least until the next release of XCode. Let's see if XCode 12.2 fixes this - if so, we can reclose this issue. If the issue persists, I think we should look for a solution, even if that solution is just in the documentation. |
XCode 12.2 is now available, and it's still a problem with XCode 12.2: Attempting to build Traits with XCode 12.2
|
One other interesting discovery: it looks as though Apple's Python does work if you pick the right executable. The
If I use the Everything else Python-related in /usr/bin appears to be a symlink to the matching framework binary; I'm not quite sure what that |
Still an issue with the Traits 6.2.0 release, macOS 10.15.7, and Xcode 12.3 (build 12C33), though the impact is somewhat lessened now that we have wheels built. It still may be worth a note in the installation instructions, though. |
This appears to no longer be an issue:
|
Ah, sorry; that's because we're downloading the wheel above. There's still an issue here. To reproduce:
|
Running "pip install traits:" on a Mac OS 10.15.7 fails. This is being done for Apple's system default Python 3.8. The first error that I can see is in the following output:
running build_ext
building 'traits.ctraits' extension
creating build/temp.macosx-10.14.6-x86_64-3.8
creating build/temp.macosx-10.14.6-x86_64-3.8/traits
xcrun -sdk macosx clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c traits/ctraits.c -o build/temp.macosx-10.14.6-x86_64-3.8/traits/ctraits.o
In file included from traits/ctraits.c:15:
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/limits.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/limits.h:63:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture
^
The text was updated successfully, but these errors were encountered: