繁体   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