python - pycryptodome setup.py 在安装pyrebase时导致错误

标签 python firebase pycrypto pycryptodome pyrebase

我正在尝试安装 Pyrebase,但我不断收到错误,我认为该错误是由 pycryptodome 的 setup.py 引起的。我到处搜索但找不到解决方案,有人知道如何解决这个问题吗?

我的输出如下 - 我在 (...) 中添加了用于截断输出的位置,该输出正在创建和复制库。

感谢您的帮助

(backend-ragxWAh7) bash-3.2$ pip install Pyrebase
Collecting Pyrebase
 (...)
Building wheels for collected packages: pycryptodome
  Running setup.py bdist_wheel for pycryptodome ... error
  Complete output from command /Users/rafilurie/.local/share/virtualenvs/backend-ragxWAh7/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-install-q_NyfS/pycryptodome/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/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-wheel-8ox7HU --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.14-intel-2.7
  creating build/lib.macosx-10.14-intel-2.7/Crypto
  copying lib/Crypto/__init__.py -> build/lib.macosx-10.14-intel-2.7/Crypto
  (...)
  copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigVerPSS_186-3.rsp -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
  warning: PCTBuildPy: byte-compiling is disabled, skipping.

  running build_ext
  warning: no support for Intel AESNI instructions
  building 'Crypto.Hash._MD2' extension
  creating build/temp.macosx-10.14-intel-2.7
  creating build/temp.macosx-10.14-intel-2.7/src
  cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DLTC_NO_ASM -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.14-intel-2.7/src/MD2.o
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  error: command 'cc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pycryptodome
  Running setup.py clean for pycryptodome
Failed to build pycryptodome
Installing collected packages: pycryptodome, Pyrebase
  Running setup.py install for pycryptodome ... error
    Complete output from command /Users/rafilurie/.local/share/virtualenvs/backend-ragxWAh7/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-install-q_NyfS/pycryptodome/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/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-record-1TJZWz/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rafilurie/.local/share/virtualenvs/backend-ragxWAh7/include/site/python2.7/pycryptodome:
    running install
    running build
    running build_py
    (...)
    creating build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
    copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5/SigVer15_186-3.rsp -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
    copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5/SigGen15_186-3.txt -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
    copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5/SigGen15_186-2.txt -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-v1.5
    creating build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
    copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigGenPSS_186-2.txt -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
    copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigGenPSS_186-3.txt -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
    copying lib/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS/SigVerPSS_186-3.rsp -> build/lib.macosx-10.14-intel-2.7/Crypto/SelfTest/Signature/test_vectors/PKCS1-PSS
    warning: PCTBuildPy: byte-compiling is disabled, skipping.

    running build_ext
    warning: no support for Intel AESNI instructions
    building 'Crypto.Hash._MD2' extension
    creating build/temp.macosx-10.14-intel-2.7
    creating build/temp.macosx-10.14-intel-2.7/src
    cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DLTC_NO_ASM -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.14-intel-2.7/src/MD2.o
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: command 'cc' failed with exit status 1

    ----------------------------------------
Command "/Users/rafilurie/.local/share/virtualenvs/backend-ragxWAh7/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-install-q_NyfS/pycryptodome/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/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-record-1TJZWz/install-record.txt --single-version-externally-managed --compile --install-headers /Users/rafilurie/.local/share/virtualenvs/backend-ragxWAh7/include/site/python2.7/pycryptodome" failed with error code 1 in /private/var/folders/d5/zwblxz7d3gxcks_wgjcyxw_00000gn/T/pip-install-q_NyfS/pycryptodome/

最佳答案

您没有有效的 C 编译器环境 (xcode)。 另请参阅此处:https://apple.stackexchange.com/questions/254380/macos-mojave-invalid-active-developer-path .

关于python - pycryptodome setup.py 在安装pyrebase时导致错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53577563/

相关文章:

firebase - 从Firebase存储获取图像

arrays - 使用 Int 对数组进行排序

javascript - 如何在不登录 firebase/js 的情况下注册用户

python - Heroku -- 导入错误 : No module named Crypto

python - 快速重新排列文本文件

python - 'numpy.ndarray' 对象没有属性 'remove'

python - 从 Pandas 专栏中删除 Twitter 提及

python - HTML5 WebSocket 服务器

python-3.x - TypeError : can't concat bytes to str. Pycrypto Aes 加密

python - 使用 PyCrypto 进行 AES 加密,使用 mcrypt 进行解密