我正在尝试在我的Mac OS X 10.7.3(Lion)上安装Orange,并且在使用pip或从源代码构建时我一直收到错误.首先,我收到的错误是:
error: command 'gcc-4.0' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
我有Xcode 4,它与gcc 4.2.1捆绑在一起.所以我安装了64位/ 32位Python 2.7.3,它内置了gcc 4.2.我还尝试使用以下方法覆盖编译器选项:
export CC=gcc-4.2
Run Code Online (Sandbox Code Playgroud)
但这产生了一个不同的错误:
gcc-4.2 not found, using clang instead
...
error: command 'clang' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
这是完整的日志:
$ python setup.py build
running build
running build_py
copying Orange/version.py -> build/lib.macosx-10.6-intel-2.7/Orange
running build_ext
gcc-4.2 not found, using clang instead
building 'Orange.orange' extension
running pyxtract for Orange.orange
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ../pyxtract/defvectors.py
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ../pyxtract/pyprops.py -n orange
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ../pyxtract/pyxtract.py -m -n orange lib_kernel.cpp …Run Code Online (Sandbox Code Playgroud) 我想运行python的ndimage来做一些图像分析.我有一台运行OSX Lion和Python 2.7的64位Mac.当我尝试从ndimage命令运行命令时,我发现我需要安装PIL.
我下载并解压缩它(现在进入下载文件夹,有没有更好的地方去做?).我运行setup.py并获取以下消息:
running install
running build
running build_py
running build_ext
--- using frameworks at /System/Library/Frameworks
building '_imaging' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DHAVE_LIBZ -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -IlibImaging -I/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.6-intel-2.7/_imaging.o
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
我读到无法在Mac OS X 10.7 Lion上构建PIL并确保我安装了32/64位版本的python 2.7(Mac OS X 64位/ 32位x86-64/i386安装程序(2.7.2)对于Mac OS …
我想用Python 2.7和"sudo pip install pandas"在MAC OS X 10.7上安装pandas.我得到的一些输出:
Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/index.c -o build/temp.macosx-10.7-intel-2.7/pandas/index.o
In file included from pandas/index.c:317:
pandas/src/numpy_helper.h: In function ‘infer_type’:
pandas/src/numpy_helper.h:32: error: ‘PyDatetimeArrType_Type’ undeclared (first use in this function)
pandas/src/numpy_helper.h:32: error: (Each undeclared identifier is reported only once
pandas/src/numpy_helper.h:32: error: for each function it appears in.)
pandas/src/numpy_helper.h: In function ‘get_datetime64_value’:
pandas/src/numpy_helper.h:53: error: ‘PyDatetimeScalarObject’ undeclared (first use in this function)
pandas/src/numpy_helper.h:53: error: expected expression before ‘)’ token
pandas/src/numpy_helper.h: In function ‘is_datetime64_object’:
pandas/src/numpy_helper.h:84: error: ‘PyDatetimeArrType_Type’ undeclared (first use in this …Run Code Online (Sandbox Code Playgroud)