hannorein / rebound

💫 An open-source multi-purpose N-body code.
https://rebound.readthedocs.io/
GNU General Public License v3.0
849 stars 219 forks source link

Error installing rebound #617

Closed Jyfjk closed 1 year ago

Jyfjk commented 1 year ago

I'm trying to install rebound for python 3.10, on Windows 10 and I'm getting the following error. Thanks for any help!


C:\WINDOWS\system32>pip install rebound Collecting rebound Using cached rebound-3.20.1.tar.gz (282 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: rebound Building wheel for rebound (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [28 lines of output] fatal: not a git repository (or any of the parent directories): .git running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\rebound copying rebound\citations.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\data.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\horizons.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\interruptible_pool.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\particle.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\plotting.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\simulation.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\simulationarchive.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\tools.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\units.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\widget.py -> build\lib.win-amd64-cpython-310\rebound copying rebound__init__.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\rebound.h -> build\lib.win-amd64-cpython-310\rebound running build_ext building 'librebound' extension creating build\temp.win-amd64-cpython-310 creating build\temp.win-amd64-cpython-310\Release creating build\temp.win-amd64-cpython-310\Release\src "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DLIBREBOUND -Isrc -IC:\Users\morga\AppData\Local\Programs\Python\Python310\include -IC:\Users\morga\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcsrc/binarydiff.c /Fobuild\temp.win-amd64-cpython-310\Release\src/binarydiff.obj -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=fa36c1e7da1c948c5f50236a84b294a2a6ab36d5 -DLIBREBOUND -D_GNU_SOURCE -fPIC cl : Command line error D8021 : invalid numeric argument '/Wno-unknown-pragmas' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\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 rebound Running setup.py clean for rebound Failed to build rebound Installing collected packages: rebound Running setup.py install for rebound ... error error: subprocess-exited-with-error

× Running setup.py install for rebound did not run successfully. │ exit code: 1 ╰─> [30 lines of output] fatal: not a git repository (or any of the parent directories): .git running install C:\Users\morga\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\rebound copying rebound\citations.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\data.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\horizons.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\interruptible_pool.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\particle.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\plotting.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\simulation.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\simulationarchive.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\tools.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\units.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\widget.py -> build\lib.win-amd64-cpython-310\rebound copying rebound__init__.py -> build\lib.win-amd64-cpython-310\rebound copying rebound\rebound.h -> build\lib.win-amd64-cpython-310\rebound running build_ext building 'librebound' extension creating build\temp.win-amd64-cpython-310 creating build\temp.win-amd64-cpython-310\Release creating build\temp.win-amd64-cpython-310\Release\src "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DLIBREBOUND -Isrc -IC:\Users\morga\AppData\Local\Programs\Python\Python310\include -IC:\Users\morga\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /Tcsrc/binarydiff.c /Fobuild\temp.win-amd64-cpython-310\Release\src/binarydiff.obj -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=fa36c1e7da1c948c5f50236a84b294a2a6ab36d5 -DLIBREBOUND -D_GNU_SOURCE -fPIC cl : Command line error D8021 : invalid numeric argument '/Wno-unknown-pragmas' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\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: legacy-install-failure

× Encountered error while trying to install package. ╰─> rebound

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

hannorein commented 1 year ago

There are instructions for installing REBOUND in WSL here:

https://rebound.readthedocs.io/en/latest/quickstart_installation/

Did you try that?