[Python-Dev] Wrong OSX platform in sysconfig.py causing installation problems (original) (raw)

Joseph Lee Nunn III josephnunn at gmail.com
Fri May 6 13:43:12 EDT 2016


Then I have found the right list to post on, for my problem is a bug in the Python 3.5.1 distribution. Albeit one which will only manifest in certain situations.

The presence of numerous -isysroot /Developer/SDKs/MacOSX10.6.sdk directives in the following file

/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/_sysconfigdata.py

Will cause errors for people who have kept around the old /Developer directory tree, and old SDKs like 10.6, for building backwards compatible old code. Newer versions of the SDKs are now kept inside the Xcode application itself. And then they will only have a problem when trying to install a package with C extensions, which in my case was Persistence, a dependency of ZODB. And even more so, ONLY when trying to pip install said package into a virtual environment created by 3.5’s pyvenv command, if installing the package into the system wide Python there will be no error.

Such is this corner-case hell I have found myself, until I decided to dump my older /Developer directory tree and SDKs, as those were for a project long defunct. You see the -isysroot flag has the unusual behavior where instead of reporting an error when it cannot find the newly specified system root it simply has no effect. So if you don’t have the SDK specified in the location specified then the flag does nothing, as I assume is the case for 99% of people.

I understand the need to make Python 3.5 backwards compatible, but doing it this way would appear to have the side effect of breaking the ability to install packages using C extensions in virtual environments, or at least it did for me.

Joseph Nunn josephnunn at gmail.com joseph.nunn at uci.edu

On May 06 , 2016, at 4:20 AM, Ned Deily <nad at python.org> wrote:

On May 6, 2016, at 05:42, Joseph Nunn <josephnunn at gmail.com> wrote: 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. [...] Hi Joseph! Welcome! Note this list is for the development of Python itself, not for usage or installation issues. The Python Developer's Guide (https://docs.python.org/devguide/) including its FAQ gives information about mailing lists and other support forums to get help with general Python issues. That said, without more information, it would be difficult to know exactly what problem you are running into but, since you mention missing headers, my guess is that you need to install Apple's Command Line Tools as described here: https://docs.python.org/devguide/setup.html#build-dependencies Installing Xcode by itself is not sufficient. The sysroot and flag values you note in sysconfigdata.py are normal and there for compatibility with installing on older versions of OS X; they should not cause a problem on newer releases. For what it's worth, I was able to install ZODB with the current python.org 3.5.1 on OS X 10.11.4 using either venv or virtualenv. Good luck! --Ned P.S. Mailing list info is available here: https://mail.python.org. The bug tracker is here: https://bugs.python.org -- Ned Deily nad at python.org -- []



More information about the Python-Dev mailing list