首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为什么无法通过pip安装bpy

为什么无法通过pip安装bpy
EN

Stack Overflow用户
提问于 2021-02-22 08:46:17
回答 1查看 296关注 0票数 1

我正在尝试使用pip安装bpy,但得到了以下结果:

代码语言:javascript
运行
复制
pip install bpy
Defaulting to user installation because normal site-packages is not writeable
Collecting bpy
  Using cached bpy-0.0.0a0.tar.gz (19 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4w20jpx9/bpy_b62f07d1f8f946ce93c92ccd56a2fc60/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4w20jpx9/bpy_b62f07d1f8f946ce93c92ccd56a2fc60/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 /tmp/pip-pip-egg-info-67myzkf8                                  
         cwd: /tmp/pip-install-4w20jpx9/bpy_b62f07d1f8f946ce93c92ccd56a2fc60/                                                                                          
    Complete output (45 lines):                                                                                                                                        
    WARNING: The wheel package is not available.                                                                                                                       
    WARNING: The wheel package is not available.                                                                                                                       
      ERROR: Command errored out with exit status 1:                                                                                                                   
       command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-neva89hz/svn_c1ad3cd7f91e47ec9b39d2ea30379414/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-neva89hz/svn_c1ad3cd7f91e47ec9b39d2ea30379414/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 /tmp/pip-wheel-ygbk6314                                             
           cwd: /tmp/pip-wheel-neva89hz/svn_c1ad3cd7f91e47ec9b39d2ea30379414/                                                                                          
      Complete output (6 lines):                                                                                                                                       
      usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]                                                                                            
         or: setup.py --help [cmd1 cmd2 ...]                                                                                                                           
         or: setup.py --help-commands                                                                                                                                  
         or: setup.py cmd --help                                                                                                                                       
                                                                                                                                                                       
      error: invalid command 'bdist_wheel'                                                                                                                             
      ----------------------------------------                                                                                                                         
      ERROR: Failed building wheel for svn
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
      File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpxv1t2_3h', '--quiet', 'svn']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-4w20jpx9/bpy_b62f07d1f8f946ce93c92ccd56a2fc60/setup.py", line 288, in <module>
        setup(name='bpy',
      File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 686, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
        dist = best[req.key] = env.best_match(
      File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
        return installer(requirement)
      File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 745, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpxv1t2_3h', '--quiet', 'svn']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我该怎么做呢?

EN

回答 1

Stack Overflow用户

发布于 2021-02-22 10:48:15

我刚刚在Python 3.9 for windows 64bts和Python3.864 for Linux上测试了安装,并且出现了同样的错误。但我找到了解决方案。问题是python的版本,我尝试在新的python版本3.7.3上安装bpy,它在虚拟机上运行良好。

关于包的规范告诉我们版本需要Python >=3.7,<3.8,所以

我认为这就是问题所在。

https://pypi.org/project/bpy/

附图如下。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66308738

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档