欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

mac下安装plyvel失败

程序员文章站 2022-03-15 18:14:32
...

mac下安装plyvel失败,报错:

ERROR: Command errored out with exit status 1:
   command: /Users/***/anaconda3/envs/py36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/***/plyvel/setup.py'"'"'; __file__='"'"'/private/var/folders/cg/ghbn9h3s2837bwygfrnsgfr40000gn/T/pip-install-wx5k_jyr/plyvel/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/***/T/pip-wheel-25rgpzbk --python-tag cp36
       cwd: /private/var/folders/****/T/pip-install-wx5k_jyr/plyvel/
  Complete output (27 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.6
  creating build/lib.macosx-10.7-x86_64-3.6/plyvel
  copying plyvel/_version.py -> build/lib.macosx-10.7-x86_64-3.6/plyvel
  copying plyvel/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/plyvel
  running build_ext
  building 'plyvel._plyvel' extension
  creating build/temp.macosx-10.7-x86_64-3.6
  creating build/temp.macosx-10.7-x86_64-3.6/plyvel
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/***/anaconda3/envs/py36/include -arch x86_64 -I/Users/****/anaconda3/envs/py36/include -arch x86_64 -I/Users/***/anaconda3/envs/py36/include/python3.6m -c plyvel/_plyvel.cpp -o build/temp.macosx-10.7-x86_64-3.6/plyvel/_plyvel.o -Wall -g -x c++ -std=c++11 -stdlib=libc++
  plyvel/_plyvel.cpp:22806:52: warning: code will never be executed [-Wunreachable-code]
          } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
                                                     ^~~~
  plyvel/_plyvel.cpp:22806:38: note: silence by adding parentheses to mark code as explicitly dead
          } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
                                       ^
                                       /* DISABLES CODE */ ( )
  1 warning generated.
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/***/anaconda3/envs/py36/include -arch x86_64 -I/Users/***/anaconda3/envs/py36/include -arch x86_64 -I/Users/****/anaconda3/envs/py36/include/python3.6m -c plyvel/comparator.cpp -o build/temp.macosx-10.7-x86_64-3.6/plyvel/comparator.o -Wall -g -x c++ -std=c++11 -stdlib=libc++
  g++ -bundle -undefined dynamic_lookup -L/Users/***/anaconda3/envs/py36/lib -arch x86_64 -L/Users/****/anaconda3/envs/py36/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/plyvel/_plyvel.o build/temp.macosx-10.7-x86_64-3.6/plyvel/comparator.o -lleveldb -o build/lib.macosx-10.7-x86_64-3.6/plyvel/_plyvel.cpython-36m-darwin.so
  clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
  ld: library not found for -lstdc++
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  error: command 'g++' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for plyvel

 

可以尝试CFLAGS='-stdlib=libc++ -std=c++11' pip3 install plyvel

相关标签: tool