hannorein / rebound

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

Error when trying to install rebound #602

Closed sambaPython24 closed 1 year ago

sambaPython24 commented 2 years ago

I am trying to install rebound for the python version 3.9 or 3.10 but get the error

Collecting rebound
  Using cached rebound-3.19.3.tar.gz (255 kB)
Building wheels for collected packages: rebound
  Building wheel for rebound (setup.py) ... error

What can I do?

System: Microsoft Windows 10 Pro Python: 3.7.12, 3.9.7, 3.10.4 Error Message ( base path replaced by ...)

Collecting rebound
  Using cached rebound-3.19.3.tar.gz (255 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: rebound
  Building wheel for rebound (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: '...\Anaconda3\envs\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'...\\AppData\\Local\\Temp\\pip-install-wan1auw_\\rebound_43adde34848f431190e8e6d13699286c\\setup.py'"'"'; __file__='"'"'...\\AppData\\Local\\Temp\\pip-install-wan1auw_\\rebound_43adde34848f431190e8e6d13699286c\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\L470\AppData\Local\Temp\pip-wheel-0cdqaagc'
       cwd: ...\AppData\Local\Temp\pip-install-wan1auw_\rebound_43adde34848f431190e8e6d13699286c\
  Complete output (28 lines):
  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-3.7
  creating build\lib.win-amd64-3.7\rebound
  copying rebound\citations.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\data.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\horizons.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\interruptible_pool.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\particle.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\plotting.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\simulation.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\simulationarchive.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\tools.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\units.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\widget.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\__init__.py -> build\lib.win-amd64-3.7\rebound
  copying rebound\rebound.h -> build\lib.win-amd64-3.7\rebound
  running build_ext
  building 'librebound' extension
  creating build\temp.win-amd64-3.7
  creating build\temp.win-amd64-3.7\Release
  creating build\temp.win-amd64-3.7\Release\src
  C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLIBREBOUND -Isrc -I...Anaconda3\envs\python39\include -I...\Anaconda3\envs\python39\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\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\\shared" "-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\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt" /Tcsrc/rebound.c /Fobuild\temp.win-amd64-3.7\Release\src/rebound.obj -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=2d9a3038c5360173ec43aa0ce97767ab002aa1f1 -DLIBREBOUND -D_GNU_SOURCE -fPIC
  cl : Befehlszeile error D8021 : Ung\x81ltiges numerisches Argument /Wno-unknown-pragmas.
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
  ----------------------------------------
  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: Command errored out with exit status 1:
     command: '...\Anaconda3\envs\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'...\\AppData\\Local\\Temp\\pip-install-wan1auw_\\rebound_43adde34848f431190e8e6d13699286c\\setup.py'"'"'; __file__='"'"'...\\AppData\\Local\\Temp\\pip-install-wan1auw_\\rebound_43adde34848f431190e8e6d13699286c\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\L470\AppData\Local\Temp\pip-record-dugcem3l\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\L470\Anaconda3\envs\python39\Include\rebound'
         cwd: C:\Users\L470\AppData\Local\Temp\pip-install-wan1auw_\rebound_43adde34848f431190e8e6d13699286c\
    Complete output (30 lines):
    fatal: not a git repository (or any of the parent directories): .git
    running install
   ...\Anaconda3\envs\python39\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      setuptools.SetuptoolsDeprecationWarning,
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\rebound
    copying rebound\citations.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\data.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\horizons.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\interruptible_pool.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\particle.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\plotting.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\simulation.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\simulationarchive.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\tools.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\units.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\widget.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\__init__.py -> build\lib.win-amd64-3.7\rebound
    copying rebound\rebound.h -> build\lib.win-amd64-3.7\rebound
    running build_ext
    building 'librebound' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLIBREBOUND -Isrc -I...\Anaconda3\envs\python39\include -I...\Anaconda3\envs\python39\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\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\\shared" "-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\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt" /Tcsrc/rebound.c /Fobuild\temp.win-amd64-3.7\Release\src/rebound.obj -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=2d9a3038c5360173ec43aa0ce97767ab002aa1f1 -DLIBREBOUND -D_GNU_SOURCE -fPIC
    cl : Befehlszeile error D8021 : Ung\x81ltiges numerisches Argument /Wno-unknown-pragmas.
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: '...\Anaconda3\envs\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'...\\AppData\\Local\\Temp\\pip-install-wan1auw_\\rebound_43adde34848f431190e8e6d13699286c\\setup.py'"'"'; __file__='"'"'...\\AppData\\Local\\Temp\\pip-install-wan1auw_\\rebound_43adde34848f431190e8e6d13699286c\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\L470\AppData\Local\Temp\pip-record-dugcem3l\install-record.txt' --single-version-externally-managed --compile --install-headers '...\Anaconda3\envs\python39\Include\rebound' Check the logs for full command output.
hannorein commented 2 years ago

With only seeing "error" as an error message, I'm afraid I don't have enough information to help you. Can you post a full error message, your operating system, etc?

hannorein commented 1 year ago

I suspect this is related to you trying to install REBOUND on windows. If so you need to use WSL.