使用pip和python 3.7.7安装bpy 2.82.1时出错

2024-04-25 13:24:30 发布

您现在位置:Python中文网/ 问答频道 /正文

我在尝试使用pip install bpy安装blender bpy 2.82.1时遇到很多问题。我使用的是MacCatalina10.15.7,使用的是python 3.7.6和PIP21.0.1。我还尝试使用Python3.7.7和PIP20.2.4安装它,但它也不起作用。根据installation guide的要求,我有cmake版本3.20.1和未来的fstrings 1.2.0

首先,安装在Building wheel for bpy (setup.py) ...需要很长时间,然后我得到以下错误

Collecting bpy
  Using cached bpy-2.82.1.tar.gz (19 kB)
Building wheels for collected packages: bpy
  Building wheel for bpy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/Username/play/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-install-yc3m13lo/bpy_cf0c17619ff6492b910de2f2d45d2ebf/setup.py'"'"'; __file__='"'"'/private/var/folders/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-install-yc3m13lo/bpy_cf0c17619ff6492b910de2f2d45d2ebf/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/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-wheel-szo_6fc8
       cwd: /private/var/folders/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-install-yc3m13lo/bpy_cf0c17619ff6492b910de2f2d45d2ebf/
  Complete output (80 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.7
  creating build/lib.macosx-10.9-x86_64-3.7/blenderpy
  copying blenderpy/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/blenderpy
  copying blenderpy/pre_uninstall.py -> build/lib.macosx-10.9-x86_64-3.7/blenderpy
  copying blenderpy/post_install.py -> build/lib.macosx-10.9-x86_64-3.7/blenderpy
  running build_ext
  Preparing the build environment
  Searching for compatible Blender online (this will take a while)
  Found compatible Blender version 2.82
  Cloning Blender source from git (this will take a while)
  Cloning precompiled libs from svn (this will take a while)
  cmake -DWITH_PYTHON_INSTALL=OFF -DWITH_PYTHON_MODULE=ON -DWITH_OPENMP=OFF -DWITH_AUDASPACE=OFF -S/private/var/folders/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-install-yc3m13lo/bpy_cf0c17619ff6492b910de2f2d45d2ebf/build/temp.macosx-10.9-x86_64-3.7/blender -B/private/var/folders/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-install-yc3m13lo/bpy_cf0c17619ff6492b910de2f2d45d2ebf/build/temp.macosx-10.9-x86_64-3.7/build
  -- The C compiler identification is AppleClang 11.0.3.11030032
  -- The CXX compiler identification is AppleClang 11.0.3.11030032
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Detected OS X 10.15.4 and Xcode 11. at /Applications/Xcode.app
  -- OSX_SYSROOT_PREFIX: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
  -- Setting deployment target to 10.11, lower versions are not supported
  CMake Warning at CMakeLists.txt:580 (message):
    WITH_OPENAL requires WITH_AUDASPACE which is disabled
  
  
  CMake Warning at CMakeLists.txt:584 (message):
    WITH_JACK requires WITH_AUDASPACE which is disabled
  
  
  -- WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now
  -- Performing Test SUPPORT_SSE_BUILD
  CMake Warning at /Applications/CMake.app/Contents/share/cmake-3.20/Modules/Platform/Darwin-Initialize.cmake:303 (message):
    Ignoring CMAKE_OSX_SYSROOT value:
  
     /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.4.sdk
  
    because the directory does not exist.
  Call Stack (most recent call first):
    /Applications/CMake.app/Contents/share/cmake-3.20/Modules/CMakeSystemSpecificInitialize.cmake:21 (include)
    /private/var/folders/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-install-yc3m13lo/bpy_cf0c17619ff6492b910de2f2d45d2ebf/build/temp.macosx-10.9-x86_64-3.7/build/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
  
  
  -- Performing Test SUPPORT_SSE_BUILD - Failed
  -- SSE Support: missing.
  -- Performing Test SUPPORT_SSE2_BUILD
  CMake Warning at /Applications/CMake.app/Contents/share/cmake-3.20/Modules/Platform/Darwin-Initialize.cmake:303 (message):
    Ignoring CMAKE_OSX_SYSROOT value:
  
     /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.4.sdk
  
    because the directory does not exist.
  Call Stack (most recent call first):
    /Applications/CMake.app/Contents/share/cmake-3.20/Modules/CMakeSystemSpecificInitialize.cmake:21 (include)
    /private/var/folders/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-install-yc3m13lo/bpy_cf0c17619ff6492b910de2f2d45d2ebf/build/temp.macosx-10.9-x86_64-3.7/build/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)
  
  
  -- Performing Test SUPPORT_SSE2_BUILD - Failed
  -- SSE2 Support: missing.
  -- Found Git: /usr/bin/git (found version "2.24.1 (Apple Git-126)")
  CMake Error at build_files/cmake/platform/platform_apple.cmake:38 (message):
    Mac OSX requires pre-compiled libs at:
    '/private/var/folders/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-install-yc3m13lo/bpy_cf0c17619ff6492b910de2f2d45d2ebf/build/temp.macosx-10.9-x86_64-3.7/blender/../lib/darwin'
  Call Stack (most recent call first):
    CMakeLists.txt:808 (include)
  
  
  -- Configuring incomplete, errors occurred!
  See also "/private/var/folders/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-install-yc3m13lo/bpy_cf0c17619ff6492b910de2f2d45d2ebf/build/temp.macosx-10.9-x86_64-3.7/build/CMakeFiles/CMakeOutput.log".
  See also "/private/var/folders/qk/52ry98fn3td8ftb66_ndrrgc0000gn/T/pip-install-yc3m13lo/bpy_cf0c17619ff6492b910de2f2d45d2ebf/build/temp.macosx-10.9-x86_64-3.7/build/CMakeFiles/CMakeError.log".
  error: command 'cmake' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for bpy
  Running setup.py clean for bpy
Failed to build bpy

但是,我仍然可以使用pip install bpy==2.82安装旧版本

Collecting bpy==2.82
Using cached bpy-2.82-cp37-cp37m-macosx_10_11_x86_64.whl (119.1 MB)
Installing collected packages: bpy
Successfully installed bpy-2.82

我知道这个错误吗?提前谢谢


Tags: installpipbuildcmakevarprivatex86macosx