首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在windows上安装CPPYY的cmd错误

在windows上安装CPPYY的cmd错误
EN

Stack Overflow用户
提问于 2020-10-08 19:53:41
回答 2查看 552关注 0票数 1

我一直试图在我的电脑上安装科皮伊,但我对此并不熟悉,所以我对此不太了解,我的电脑上安装了python和pip。

代码语言:javascript
复制
C:\WINDOWS\system32>python --version
Python 3.8.6

C:\WINDOWS\system32> pip --version
pip 20.2.3

当我试着跑

pip安装

cmd给了我错误

代码语言:javascript
复制
    ERROR: Command errored out with exit status 1:
   command: 'C:\Users\sarfaraz\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Users\sarfaraz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\sarfaraz\AppData\Local\Temp\pip-build-env-z4gw8trb\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'CPyCppyy==1.11.4; python_implementation != '"'"'PyPy'"'"'' 'cppyy-backend==1.14.0; python_implementation != '"'"'PyPy'"'"'' 'cppyy-cling==6.21.3; python_implementation != '"'"'PyPy'"'"'' 'cppyy-cling<=6.18.2.3; python_implementation == '"'"'PyPy'"'"'' setuptools wheel
       cwd: None
  Complete output (42 lines):
  Ignoring cppyy-cling: markers 'platform_python_implementation == "PyPy"' don't match your environment
  Collecting CPyCppyy==1.11.4
    Using cached CPyCppyy-1.11.4.tar.gz (178 kB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\sarfaraz\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Users\sarfaraz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\sarfaraz\AppData\Local\Temp\pip-build-env-hj42_3n3\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'cppyy-cling>=6.21.3' 'cppyy-backend>=1.14' setuptools wheel
         cwd: None
    Complete output (31 lines):
    Collecting cppyy-cling>=6.21.3
      Using cached cppyy_cling-6.21.3-py2.py3-none-win_amd64.whl (18.2 MB)
    Collecting cppyy-backend>=1.14
      Using cached cppyy-backend-1.14.0.tar.gz (32 kB)
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
        Preparing wheel metadata: started
        Preparing wheel metadata: finished with status 'done'
    Collecting setuptools
      Using cached setuptools-50.3.0-py3-none-any.whl (785 kB)
    Collecting wheel
      Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
    Building wheels for collected packages: cppyy-backend
      Building wheel for cppyy-backend (PEP 517): started
      Building wheel for cppyy-backend (PEP 517): finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: 'C:\Users\sarfaraz\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Users\sarfaraz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\sarfaraz\AppData\Local\Temp\tmpojxb8d41'
           cwd: C:\Users\sarfaraz\AppData\Local\Temp\pip-install-znkz3pmg\cppyy-backend
      Complete output (6 lines):
      running bdist_wheel
      running build
      running build_ext
      checking for build\temp.win-amd64-3.8\Release
      creating build\temp.win-amd64-3.8\Release
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      ----------------------------------------
      ERROR: Failed building wheel for cppyy-backend
    Failed to build cppyy-backend
    ERROR: Could not build wheels for cppyy-backend which use PEP 517 and cannot be installed directly
    ----------------------------------------
  ERROR: Command errored out with exit status 1: 'C:\Users\sarfaraz\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Users\sarfaraz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\sarfaraz\AppData\Local\Temp\pip-build-env-hj42_3n3\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'cppyy-cling>=6.21.3' 'cppyy-backend>=1.14' setuptools wheel Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\sarfaraz\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Users\sarfaraz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\sarfaraz\AppData\Local\Temp\pip-build-env-z4gw8trb\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'CPyCppyy==1.11.4; python_implementation != '"'"'PyPy'"'"'' 'cppyy-backend==1.14.0; python_implementation != '"'"'PyPy'"'"'' 'cppyy-cling==6.21.3; python_implementation != '"'"'PyPy'"'"'' 'cppyy-cling<=6.18.2.3; python_implementation == '"'"'PyPy'"'"'' setuptools wheel Check the logs for full command output.

我在网站上找到了一些指导,但我很难理解,因为我是新手。

提前感谢

EN

回答 2

Stack Overflow用户

发布于 2020-10-08 19:58:04

试着升级安装工具轮

代码语言:javascript
复制
pip install -U setuptools wheel

结束,然后尝试

代码语言:javascript
复制
pip install cppyy --no-index

如果没有帮助的话,这个问题可能由于python3.8 by PyPi it‘s supported <=3.7

票数 0
EN

Stack Overflow用户

发布于 2020-10-09 16:47:42

正如在错误消息中所显示的以及hoefling已经提到的,您需要一个系统编译器,对于系统头,至少需要一个编译器,但是对于C++库头也是如此。Cling需要这些标头中的代码来解析您可能提供给它的使用C++标准库或C++系统特性的任何新代码。

原则上,可以通过cppyy发布预编译的头部,其中包含所有的系统头和C++头作为IR bitcode,但是MSVC喜欢在不同版本之间更改标头包含保护,这样只有在没有系统编译器的情况下才能工作。(在Linux上更好一些,但在某些情况下,它也更改了包含保护名。)这将在Windows上支持预编译模块(PCM;而不是头)后重新讨论。然后,如果没有可用的系统编译器,就可以预先打包并有条件地安装这些PCM。然而,上游的模块支持仍然非常新鲜,甚至还没有发布,所以这只会出现在中期。

不管怎样,MSVC现在是免费的。:)

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

https://stackoverflow.com/questions/64269712

复制
相关文章

相似问题

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