[Python-Dev] Wrong OSX platform in sysconfig.py causing installation problems
Joseph Nunn
josephnunn at gmail.com
Fri May 6 05:42:06 EDT 2016
Hello Everyone, my first post. I would also like to subscribe but
haven't seen how yet.
So I've an issue with how the 3.5.1 OSX
package installs on OSX. The problem was first made apparent
when trying to create a virtual environment and `pip install ZODB`,
which failed as clang and the linker could not find either the
include or lib directories for a dependency. By adding a -v option
to the compiler options I was able to see in the compiler flags
the following:
-isysroot /Developer/SDKs/MacOSX10.6.sdk
Which was not present in the compiler flags of other people
who I was talking with. The isysroot flag changes the location
of includes and libs from the system default, which would be
why they can't be found. After grepping around a bit I found
this file:
/Library/Frameworks/Python.framework/Versions/3.5
/lib/python3.5/_sysconfigdata.py
Within which are many mentions of this flag, as so:
'CONFIGURE_CFLAGS': '-arch i386 -arch x86_64 -isysroot
/Developer/SDKs/MacOSX10.6.sdk -g',
'CONFIGURE_CFLAGS_NODIST': '-Werror=declaration-after
-statement',
'CONFIGURE_CPPFLAGS':
'-isysroot /Developer/SDKs/MacOSX10.6.sdk',
'CONFIGURE_LDFLAGS': '-arch i386 -arch x86_64 -isysroot
/Developer/SDKs/MacOSX10.6.sdk -g',
'CONFIG_ARGS': "'-C' '--enable-framework' '--enable-
universalsdk=/Developer/SDKs/MacOSX10.6.sdk'
'--with-universal-archs=intel'
'--with-computed-gotos' '--without-ensurepip' 'LDFLAGS=-g'
'CFLAGS=-g'
'CC=gcc-4.2'",
among others.
By running Python 3.5's sysconfig.py as a module, via
`python -m sysconfig`, I see the following at the beginning
of the output:
Platform: "macosx-10.6-intel"
Python version: "3.5"
Current installation scheme: "posix_prefix"
And when I simply go into python interactive mode, import
sysconfig, and type
sysconfig.get_platform() it returns macosx-10.6-intel.
I believe somehow the platform being reported is incorrect,
but looking at my environment, I do not have any kind of
compiler flags or anything else like that set
in my bash init files.
Can someone who has a working OSX 3.5 installation check
their reported platform to see what it is and if anyone has an
idea as to how this information is getting into the installation
and where I might change it please let me know.
Sincerely,
Joseph
josephnunn at gmail.com
More information about the Python-Dev
mailing list