簡體   English   中英

Mac OS Big Sur 更新導致 django 1.11 的 pip 安裝要求與 cffi 錯誤

[英]Mac OS Big Sur update causing pip install requirements for django 1.11 with cffi error

Mac OS Big Sur 更新導致 django 1.11 的 pip 安裝要求出現 cffi 錯誤。 我該如何解決這個問題?

Running setup.py install for cffi ... error
ERROR: Command errored out with exit status 1:
 command: /Users/axil/Documents/project/projectdotcom/projectdotcomenv_v2/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gp/2f22kt6s75d8tf653xq_5rfh0000gn/T/pip-install-nsm19ufc/cffi_73cb07cbfd52456caf370009aa7e0938/setup.py'"'"'; __file__='"'"'/private/var/folders/gp/2f22kt6s75d8tf653xq_5rfh0000gn/T/pip-install-nsm19ufc/cffi_73cb07cbfd52456caf370009aa7e0938/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/gp/2f22kt6s75d8tf653xq_5rfh0000gn/T/pip-record-y3_9oop2/install-record.txt --single-version-externally-managed --compile --install-headers /Users/axil/Documents/project/projectdotcom/projectdotcomenv_v2/include/site/python3.8/cffi
     cwd: /private/var/folders/gp/2f22kt6s75d8tf653xq_5rfh0000gn/T/pip-install-nsm19ufc/cffi_73cb07cbfd52456caf370009aa7e0938/
Complete output (65 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/error.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/model.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/api.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/commontypes.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/lock.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/recompiler.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/cparser.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/verifier.py -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_embedding.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.macosx-10.9-x86_64-3.8/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/c
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/local/Cellar/libffi/3.3/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi -I/Users/axil/Documents/project/projectdotcom/projectdotcomenv_v2/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-10.9-x86_64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:4197:31: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        *p_printable_filename = PyText_AsUTF8(s);
                              ^ ~~~~~~~~~~~~~~~~
c/_cffi_backend.c:5911:9: warning: 'ffi_prep_closure' is deprecated [-Wdeprecated-declarations]
    if (ffi_prep_closure(closure, &cif_descr->cif,
        ^
/usr/local/Cellar/libffi/3.3/include/ffi.h:341:18: note: 'ffi_prep_closure' has been explicitly marked deprecated here
  __attribute__((deprecated))
                 ^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:20:30: error: incomplete definition of type 'struct _is'
    builtins = tstate->interp->builtins;
               ~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
       ^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:160:39: error: incomplete definition of type 'struct _is'
    new1 = PyThreadState_GET()->interp->modules;
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
       ^
In file included from c/_cffi_backend.c:7370:
In file included from c/cffi1_module.c:20:
c/call_python.c:249:63: error: incomplete definition of type 'struct _is'
        if (externpy->reserved1 != PyThreadState_GET()->interp->modules) {
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/pystate.h:20:8: note: forward declaration of 'struct _is'
struct _is;
       ^
2 warnings and 3 errors generated.
error: command 'gcc' failed with exit status 1

我有相似性問題。 也許,你的python版本太高了,你可以把你的python版本改成3.6,就可以了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM