Mac osx lion, virtualenv, pil install - gcc error

后端 未结 5 940
刺人心
刺人心 2021-02-08 15:14

I have just completed the xcode install, mac osx lion. Upon completion I attempted to install PIL in a virtual enviroment using pip, easy_install and home brew. All three are er

5条回答
  •  礼貌的吻别
    2021-02-08 15:43

    Xcode 4.1 on OS X Lion 10.7 no longer includes gcc-4.0 as it did in earlier versions of OS X. When you install a Python package like PIL that includes a C extension module, Python's Distutils will attempt to use the same version of the C compiler that that Python itself was build with. It sounds like the version of Python that was used to create your virtualenv is an older 32-bit-only Python built with gcc-4.0. You can tell for sure by starting the python in your virtualenv. If it says gcc-4.0, you will need to re-create the virtualenv, using a newer base Python, either one of the Apple-supplied Pythons in Lion or installing a newer python using a python.org installer or a brew recipe. Then install Distribute and pip and virtualenv for that Python, create a new virutalenv and then install PIL in it.

提交回复
热议问题