我在安装/升级python模块时遇到了很多问题。我是新手,所以请记住这一点。现在我尝试安装/卸载Xcode及其命令行工具。我尝试过gcc-osx,但当我必须安装python模块时,似乎什么都不起作用。在
Python有什么问题吗?我也想到了,下载了最新版本。我在macosx小牛,我用过xcode5和xcode4,似乎什么都不管用。问题是error: command 'gcc-4.2' failed with exit status 1
?或者这是一种症状?请帮我把头发扯下来试着让这个工作起来。在
编辑:好的,我修正了这个。我不得不完全删除python并重新安装它。现在模块编译!!!在
这里有一个例子:
pip install Cython --upgrade
Downloading/unpacking Cython from https://pypi.python.org/packages/source/C/Cython/Cython-0.20.tar.gz#md5=104f3bcdeb4969ba426a37376b4c0e7f
Running setup.py egg_info for package Cython
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
Installing collected packages: Cython
Found existing installation: Cython 0.16
Uninstalling Cython:
Successfully uninstalled Cython
Running setup.py install for Cython
building 'Cython.Plex.Scanners' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /private/var/folders/cy/7qjrqmz96cdb_4chkp1lcv300000gn/T/pip-build-Mike/Cython/Cython/Plex/Scanners.c -o build/temp.macosx-10.6-intel-2.7/private/var/folders/cy/7qjrqmz96cdb_4chkp1lcv300000gn/T/pip-build-Mike/Cython/Cython/Plex/Scanners.o
In file included from /private/var/folders/cy/7qjrqmz96cdb_4chkp1lcv300000gn/T/pip-build-Mike/Cython/Cython/Plex/Scanners.c:16:
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:19:20: error: limits.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:22:2: error: #error "Something's broken. UCHAR_MAX should be defined in limits.h."
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:26:2: error: #error "Python's source code assumes C's unsigned char is an 8-bit type."
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:19: error: stdio.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:35:5: error: #error "Python.h requires that stdio.h define NULL."
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:38:20: error: string.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:40:19: error: errno.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:42:20: error: stdlib.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:44:20: error: unistd.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:56:20: error: assert.h: No such file or directory
以后有很多错误
^{pr2}$
目前没有回答
相关问题 更多 >
编程相关推荐