wlav / cppyy

Other
387 stars 39 forks source link

cant install #160

Closed hanicraft closed 8 months ago

hanicraft commented 1 year ago

its give me this error Collecting cppyy==1.0.0 Using cached cppyy-1.0.0.tar.gz (9.0 kB) Preparing metadata (setup.py) ... done Collecting CPyCppyy>=1.0.0 (from cppyy==1.0.0) Using cached CPyCppyy-1.12.13.tar.gz (207 kB) Installing build dependencies ... error error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [41 lines of output] Collecting cppyy-cling==6.28.0 Using cached cppyy_cling-6.28.0-py2.py3-none-win_amd64.whl (27.7 MB) Collecting cppyy-backend==1.14.11 Using cached cppyy-backend-1.14.11.tar.gz (34 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 metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting setuptools Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB) Collecting wheel Using cached wheel-0.40.0-py3-none-any.whl (64 kB) Building wheels for collected packages: cppyy-backend Building wheel for cppyy-backend (pyproject.toml): started Building wheel for cppyy-backend (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error

    Building wheel for cppyy-backend (pyproject.toml) did not run successfully.
    exit code: 1

    [12 lines of output]
    running bdist_wheel
    running build
    running build_ext
    checking for build\temp.win-amd64-cpython-39\Release
    creating build\temp.win-amd64-cpython-39\Release
    creating build\temp.win-amd64-cpython-39\Release\src
    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\HaniCraft\AppData\Local\Temp\pip-build-env-u6lzhpqq\overlay\Lib\site-packages\cppyy_backend\include -IC:\Users\HaniCraft\AppData\Local\Programs\Python\Python39\include -IC:\Users\HaniCraft\AppData\Local\Programs\Python\Python39\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /EHsc /Tpsrc\clingwrapper.cxx /Fobuild\temp.win-amd64-cpython-39\Release\src\clingwrapper.obj -O2 -Zc:__cplusplus /std:c++latest /GR /EHsc- /MD
    cl : Command line warning D9025 : overriding '/EHc' with '/EHc-'
    cl : Command line warning D9002 : ignoring unknown option '-Zc:__cplusplus'
    clingwrapper.cxx
    C:\Users\HaniCraft\AppData\Local\Temp\pip-build-env-u6lzhpqq\overlay\Lib\site-packages\cppyy_backend\include\ROOT/RConfig.hxx(42): fatal error C1189: #error:  "ROOT requires Visual Studio 2017 or higher."
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
    [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for cppyy-backend
  Failed to build cppyy-backend
  ERROR: Could not build wheels for cppyy-backend, which is required to install pyproject.toml-based projects
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Gabrielcarvfer commented 1 year ago

The error says:

ROOT requires Visual Studio 2017 or higher.

Based on the command line, you have Microsoft Visual Studio 14.0 = 2015. You need to update your Visual Studio installation. :)

wlav commented 1 year ago

Odd, I could have sworn I answered this one last week, but I don't see my answer ...

It's not quite that ... pip's dependency management is silly and OP seems to have an old system with a new pip. The latter will use pep517 and will unfortunately install the latest backend for the build time and only select the proper matching version for the runtime (this also means pip will build the backend twice). It's that newer build that won't work with old VS.

So, either build with --no-use-pep517 or install the dependencies independently.

That said IIRC, it's only as of cppyy 1.4.x that Windows is properly and fully supported out-of-the-box (older version will only work with 32b Windows). I.e., I doubt that 1.0.0 will work at all as intended.

And all that said, why use 1.0.0? It's ancient. :)

wlav commented 8 months ago

Closing under the assumption that a more recent release of cppyy (we're currently at 3.1.0) works.