dtamayo / reboundx

A library for adding additional forces to the REBOUND N-body integration package
GNU General Public License v3.0
80 stars 60 forks source link

Trouble Installing reboundx #128

Closed kbryant25 closed 3 months ago

kbryant25 commented 3 months ago

I've been trying to install reboundx but I keep getting an error message that reads as follows

(base) C:\Users\k>pip install reboundx
Collecting reboundx
  Using cached reboundx-4.1.0.tar.gz (91 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: rebound>=4.0.0 in c:\users\k\anaconda3\lib\site-packages (from reboundx) (4.4.1)
Building wheels for collected packages: reboundx
  Building wheel for reboundx (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for reboundx (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [69 lines of output]
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-cpython-311
    creating build\lib.win-amd64-cpython-311\reboundx
    copying reboundx\constants.py -> build\lib.win-amd64-cpython-311\reboundx
    copying reboundx\data.py -> build\lib.win-amd64-cpython-311\reboundx
    copying reboundx\extras.py -> build\lib.win-amd64-cpython-311\reboundx
    copying reboundx\params.py -> build\lib.win-amd64-cpython-311\reboundx
    copying reboundx\simulationarchive.py -> build\lib.win-amd64-cpython-311\reboundx
    copying reboundx\testing.py -> build\lib.win-amd64-cpython-311\reboundx
    copying reboundx\tools.py -> build\lib.win-amd64-cpython-311\reboundx
    copying reboundx\__init__.py -> build\lib.win-amd64-cpython-311\reboundx
    running build_ext
    *** C:\Users\k\AppData\Local\Temp\pip-build-env-qbs66t6l\overlay\Lib\site-packages\rebound *** C:\Users\k\anaconda3\Lib\site-packages/ ***
    building 'libreboundx' extension
    creating build\temp.win-amd64-cpython-311
    creating build\temp.win-amd64-cpython-311\Release
    creating build\temp.win-amd64-cpython-311\Release\src
    "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DLIBREBOUNDX -Isrc -IC:\Users\k\anaconda3\include -IC:\Users\k\anaconda3\Include -IC:\Users\k\AppData\Local\Temp\pip-build-env-qbs66t6l\overlay\Lib\site-packages\rebound "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/central_force.c /Fobuild\temp.win-amd64-cpython-311\Release\src/central_force.obj -DREBXGITHASH=3c90f8eac95aef924f2d3218c43505bd365f80ab -DLIBREBOUNDX -D_GNU_SOURCE
    central_force.c
    "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DLIBREBOUNDX -Isrc -IC:\Users\k\anaconda3\include -IC:\Users\k\anaconda3\Include -IC:\Users\k\AppData\Local\Temp\pip-build-env-qbs66t6l\overlay\Lib\site-packages\rebound "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/core.c /Fobuild\temp.win-amd64-cpython-311\Release\src/core.obj -DREBXGITHASH=3c90f8eac95aef924f2d3218c43505bd365f80ab -DLIBREBOUNDX -D_GNU_SOURCE
    core.c
    src/core.c(153): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    src/core.c(263): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    src/core.c(346): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    src/core.c(376): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    src/core.c(439): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    src/core.c(601): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    src/core.c(857): warning C4133: 'function': incompatible types - from 'void **' to 'rebx_node **'
    src/core.c(969): warning C4244: 'function': conversion from 'const double' to 'const int', possible loss of data
    src/core.c(1033): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DLIBREBOUNDX -Isrc -IC:\Users\k\anaconda3\include -IC:\Users\k\anaconda3\Include -IC:\Users\k\AppData\Local\Temp\pip-build-env-qbs66t6l\overlay\Lib\site-packages\rebound "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/exponential_migration.c /Fobuild\temp.win-amd64-cpython-311\Release\src/exponential_migration.obj -DREBXGITHASH=3c90f8eac95aef924f2d3218c43505bd365f80ab -DLIBREBOUNDX -D_GNU_SOURCE
    exponential_migration.c
    "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DLIBREBOUNDX -Isrc -IC:\Users\k\anaconda3\include -IC:\Users\k\anaconda3\Include -IC:\Users\k\AppData\Local\Temp\pip-build-env-qbs66t6l\overlay\Lib\site-packages\rebound "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/gas_dynamical_friction.c /Fobuild\temp.win-amd64-cpython-311\Release\src/gas_dynamical_friction.obj -DREBXGITHASH=3c90f8eac95aef924f2d3218c43505bd365f80ab -DLIBREBOUNDX -D_GNU_SOURCE
    gas_dynamical_friction.c
    C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_math_defines.h(28): warning C4005: 'M_PI': macro redefinition
    C:\Users\k\AppData\Local\Temp\pip-install-nz9xn2ux\reboundx_027d65c1b2a9470fb641c09e67ac6bb0\src\reboundx.h(29): note: see previous definition of 'M_PI'
    src/gas_dynamical_friction.c(126): warning C4244: 'function': conversion from 'double' to 'int', possible loss of data
    "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DLIBREBOUNDX -Isrc -IC:\Users\k\anaconda3\include -IC:\Users\k\anaconda3\Include -IC:\Users\k\AppData\Local\Temp\pip-build-env-qbs66t6l\overlay\Lib\site-packages\rebound "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/gr.c /Fobuild\temp.win-amd64-cpython-311\Release\src/gr.obj -DREBXGITHASH=3c90f8eac95aef924f2d3218c43505bd365f80ab -DLIBREBOUNDX -D_GNU_SOURCE
    gr.c
    "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DLIBREBOUNDX -Isrc -IC:\Users\k\anaconda3\include -IC:\Users\k\anaconda3\Include -IC:\Users\k\AppData\Local\Temp\pip-build-env-qbs66t6l\overlay\Lib\site-packages\rebound "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/gr_full.c /Fobuild\temp.win-amd64-cpython-311\Release\src/gr_full.obj -DREBXGITHASH=3c90f8eac95aef924f2d3218c43505bd365f80ab -DLIBREBOUNDX -D_GNU_SOURCE
    gr_full.c
    src/gr_full.c(63): error C2057: expected constant expression
    src/gr_full.c(63): error C2466: cannot allocate an array of constant size 0
    src/gr_full.c(63): error C2133: 'a_const': unknown size
    src/gr_full.c(64): error C2057: expected constant expression
    src/gr_full.c(64): error C2466: cannot allocate an array of constant size 0
    src/gr_full.c(64): error C2133: 'a_newton': unknown size
    src/gr_full.c(65): error C2057: expected constant expression
    src/gr_full.c(65): error C2466: cannot allocate an array of constant size 0
    src/gr_full.c(65): error C2133: 'a_new': unknown size
    src/gr_full.c(66): error C2057: expected constant expression
    src/gr_full.c(66): error C2466: cannot allocate an array of constant size 0
    src/gr_full.c(66): error C2057: expected constant expression
    src/gr_full.c(66): error C2466: cannot allocate an array of constant size 0
    src/gr_full.c(66): error C2087: 'rs': missing subscript
    src/gr_full.c(66): error C2133: 'rs': unknown size
    src/gr_full.c(67): error C2057: expected constant expression
    src/gr_full.c(67): error C2466: cannot allocate an array of constant size 0
    src/gr_full.c(67): error C2057: expected constant expression
    src/gr_full.c(67): error C2466: cannot allocate an array of constant size 0
    src/gr_full.c(67): error C2087: 'drs': missing subscript
    src/gr_full.c(67): error C2133: 'drs': unknown size
    src/gr_full.c(174): error C2057: expected constant expression
    src/gr_full.c(174): error C2466: cannot allocate an array of constant size 0
    src/gr_full.c(174): error C2133: 'a_old': unknown size
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.40.33807\\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 reboundx
Failed to build reboundx
ERROR: Could not build wheels for reboundx, which is required to install pyproject.toml-based projects

I can't figure out the source of this error. I tried using pip install reboundx —no-cache-dir and similar variations of pip install and got the same error. I've searched similar issues with similar error codes online and tried as many of those fixes as I can but none have worked. Is there another package that I'm missing or any known conflicts with other packages?

I have rebound 4.4.1 and wheel 0.41.2 already installed Windows 10 Using Spyder (Python 3.11)

dtamayo commented 3 months ago

Hi, we'd like to extend compatibility to Windows at some point like REBOUND, but unfortunately REBOUNDx does not currently run on Windows