簡體   English   中英

安裝 bpy 包 python 的問題

[英]Issue installing bpy package python

我正在嘗試安裝bpy包,但出現此錯誤:

sara@studentacbook94 ~ % pip install bpy
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting bpy
  Using cached bpy-1.2.2.tar.gz (20 kB)
    ERROR: Command errored out with exit status 1:
     command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py'"'"'; __file__='"'"'/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/pip-egg-info
         cwd: /private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/05/2hk0czls3nlgx3p6jfk6jk5h0000gp/T/pip-install-1Ot9ZU/bpy/setup.py", line 179
        def build_cmake(self, extension: Extension):
                                       ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我該如何處理?

出現此錯誤是因為您使用的是 Python 2.7,並且所需的包具有僅在 3.5 ( documentaion ) 中添加的類型提示。

升級你的 Python 版本

暫無
暫無

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

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