Reinstalling python on Mac OS 10.6 with a different gcc version

后端 未结 2 1660
别那么骄傲
别那么骄傲 2020-12-20 06:03

I am trying to install a Python package that requires running gcc 4.2. My gcc is pointing correctly to gcc-4.2, i.e.

$ gcc -v
Using built-in specs.
Target:          


        
2条回答
  •  北荒
    北荒 (楼主)
    2020-12-20 06:44

    This is most likely an issue with distutils, you shouldn't need to recompile python, or reinstall any packages.

    Have you checked to see what version your CC environment variable is set to? It may very well still be set to 4.0. You can try:

    export CC=gcc-4.2
    python setup.py build
    

    You could also take a look at:

    /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config/Makefile

    Which is where distutils gets its build settings from.

提交回复
热议问题