setup.py
我有以下要求
install_requires=['...
'ruamel.ordereddict==0.4.13',
...]
但是在运行时
pip install --editable .
Running setup.py install for ruamel.ordereddict ... error
ERROR: Complete output from command /Users/pkaramol/Workspace/sharky/.venv/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nr/8zg_9fs9691gyz79b973s7nr0000gn/T/pip-install-knobw0pg/ruamel.ordereddict/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nr/8zg_9fs9691gyz79b973s7nr0000gn/T/pip-record-rrkms9gr/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pkaramol/Workspace/sharky/.venv/bin/../include/site/python3.7/ruamel.ordereddict:
ERROR: running install
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/ruamel
creating build/lib.macosx-10.14-x86_64-3.7/ruamel/ordereddict
copying ./__init__.py -> build/lib.macosx-10.14-x86_64-3.7/ruamel/ordereddict
copying ./setup.py -> build/lib.macosx-10.14-x86_64-3.7/ruamel/ordereddict
running build_ext
building '_ordereddict' extension
creating build/temp.macosx-10.14-x86_64-3.7
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c ordereddict.c -o build/temp.macosx-10.14-x86_64-3.7/ordereddict.o
ordereddict.c:973:30: warning: implicit declaration of function '_Py_atomic_load_relaxed' is invalid in C99 [-Wimplicit-function-declaration]
tstate = (PyThreadState*)_Py_atomic_load_relaxed(
^
ordereddict.c:974:10: error: use of undeclared identifier '_PyThreadState_Current'
&_PyThreadState_Current);
^
ordereddict.c:1581:47: error: too many arguments to function call, expected 2, have 3
&missing_str);
^~~~~~~~~~~~
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/object.h:507:12: note: '_PyObject_LookupSpecial' declared here
PyAPI_FUNC(PyObject *) _PyObject_LookupSpecial(PyObject *, _Py_Identifier *);
^
ordereddict.c:1650:15: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
if (s > sizeof(recycle_on_stack)) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
ordereddict.c:2858:13: error: no member named 'ma_table' in 'PyDictObject'
if (mp->ma_table != mp->ma_smalltable)
~~ ^
(.venv) Tue Jul 23-10:27:07 ~/Workspace/sharky2
*⣠$ pip install ruamel.ordereddict==0.4.13
Looking in indexes: https://pypi.org/simple, https://someuser:****@mycustomrepo/something/api/pypi/pypi/simple
Collecting ruamel.ordereddict==0.4.13
Using cached https://files.pythonhosted.org/packages/b1/8f/3b1b407ff387e006a4a33e62182b212077bed41676451d60327955a50c3c/ruamel.ordereddict-0.4.13.tar.gz
Building wheels for collected packages: ruamel.ordereddict
Building wheel for ruamel.ordereddict (setup.py) ... error
ERROR: Complete output from command /Users/pkaramol/Workspace/sharky/.venv/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nr/8zg_9fs9691gyz79b973s7nr0000gn/T/pip-install-7ggoabt5/ruamel.ordereddict/setup.py'"'"';f=getattr(
tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/nr/8zg_9fs9691gyz79b973s7nr0000gn/T/pip-wheel-gdqpc4g2 --python-tag cp37:
ERROR: running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/ruamel
creating build/lib.macosx-10.14-x86_64-3.7/ruamel/ordereddict
copying ./__init__.py -> build/lib.macosx-10.14-x86_64-3.7/ruamel/ordereddict
copying ./setup.py -> build/lib.macosx-10.14-x86_64-3.7/ruamel/ordereddict
running build_ext
building '_ordereddict' extension
creating build/temp.macosx-10.14-x86_64-3.7
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c ordereddict.c -o build/temp.macosx-10.14-x86_64-3.7/ordereddict.o
ordereddict.c:973:30: warning: implicit declaration of function '_Py_atomic_load_relaxed' is invalid in C99 [-Wimplicit-function-declaration]
tstate = (PyThreadState*)_Py_atomic_load_relaxed(
^
ordereddict.c:974:10: error: use of undeclared identifier '_PyThreadState_Current'
&_PyThreadState_Current);
^
ordereddict.c:1581:47: error: too many arguments to function call, expected 2, have 3
&missing_str);
^~~~~~~~~~~~
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/object.h:507:12: note: '_PyObject_LookupSpecial' declared here
PyAPI_FUNC(PyObject *) _PyObject_LookupSpecial(PyObject *, _Py_Identifier *);
^
ordereddict.c:1650:15: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
if (s > sizeof(recycle_on_stack)) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
ordereddict.c:2858:13: error: no member named 'ma_table' in 'PyDictObject'
if (mp->ma_table != mp->ma_smalltable)
~~ ^
ordereddict.c:2858:29: error: no member named 'ma_smalltable' in 'PyDictObject'
if (mp->ma_table != mp->ma_smalltable)
~~ ^
ordereddict.c:2859:26: error: no member named 'ma_mask' in 'PyDictObject'
res = res + (mp->ma_mask + 1) * sizeof(PyOrderedDictEntry);
~~ ^
2 warnings and 5 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for ruamel.ordereddict
Running setup.py clean for ruamel.ordereddict
Failed to build ruamel.ordereddict
Installing collected packages: ruamel.ordereddict
Running setup.py install for ruamel.ordereddict ... error
ERROR: Complete output from command /Users/pkaramol/Workspace/sharky/.venv/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nr/8zg_9fs9691gyz79b973s7nr0000gn/T/pip-install-7ggoabt5/ruamel.ordereddict/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nr/8zg_9fs9691gyz79b973s7nr0000gn/T/pip-record-_vhz9tlj/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pkaramol/Workspace/sharky/.venv/bin/../include/site/python3.7/ruamel.ordereddict:
ERROR: running install
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/ruamel
creating build/lib.macosx-10.14-x86_64-3.7/ruamel/ordereddict
copying ./__init__.py -> build/lib.macosx-10.14-x86_64-3.7/ruamel/ordereddict
copying ./setup.py -> build/lib.macosx-10.14-x86_64-3.7/ruamel/ordereddict
running build_ext
building '_ordereddict' extension
creating build/temp.macosx-10.14-x86_64-3.7
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c ordereddict.c -o build/temp.macosx-10.14-x86_64-3.7/ordereddict.o
ordereddict.c:973:30: warning: implicit declaration of function '_Py_atomic_load_relaxed' is invalid in C99 [-Wimplicit-function-declaration]
tstate = (PyThreadState*)_Py_atomic_load_relaxed(
^
ordereddict.c:974:10: error: use of undeclared identifier '_PyThreadState_Current'
&_PyThreadState_Current);
^
ordereddict.c:1581:47: error: too many arguments to function call, expected 2, have 3
&missing_str);
^~~~~~~~~~~~
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m/object.h:507:12: note: '_PyObject_LookupSpecial' declared here
PyAPI_FUNC(PyObject *) _PyObject_LookupSpecial(PyObject *, _Py_Identifier *);
^
ordereddict.c:1650:15: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
if (s > sizeof(recycle_on_stack)) {
~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
ordereddict.c:2858:13: error: no member named 'ma_table' in 'PyDictObject'
if (mp->ma_table != mp->ma_smalltable)
~~ ^
ordereddict.c:2858:29: error: no member named 'ma_smalltable' in 'PyDictObject'
if (mp->ma_table != mp->ma_smalltable)
~~ ^
ordereddict.c:2859:26: error: no member named 'ma_mask' in 'PyDictObject'
res = res + (mp->ma_mask + 1) * sizeof(PyOrderedDictEntry);
~~ ^
2 warnings and 5 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command "/Users/pkaramol/Workspace/sharky/.venv/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/nr/8zg_9fs9691gyz79b973s7nr0000gn/T/pip-install-7ggoabt5/ruamel.ordereddict/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nr/8zg_9fs9691gyz79b973s7nr0000gn/T/pip-record-_vhz9tlj/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pkaramol/Workspace/sharky/.venv/bin/../include/site/python3.7/ruamel.ordereddict" failed with error code 1 in /private/var/folders/nr/8zg_9fs9691gyz79b973s7nr0000gn/T/pip-install-7ggoabt5/ruamel.ordereddict/
知道为什么吗?