Error with installing REBOUND in Python/PIP: ...Microsoft Visual Studio\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

Viewed 292

I have a problem with installing Rebound via pip on Python. I initialize the installation with:

pip3 install rebound

Output starts with the following:

Collecting rebound
  Using cached rebound-3.14.0.tar.gz (250 kB)
Using legacy 'setup.py install' for rebound, since package 'wheel' is not installed.
Installing collected packages: rebound
    Running setup.py install for rebound ... \

and then an error appears:

Running setup.py install for rebound ... \    WARNING: Subprocess output does not appear to be encoded as cp1250
error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\jacob\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jacob\\AppData\\Local\\Temp\\pip-install-clca5gs3\\rebound_a19ceff23d4844dfb1d9ce4d08fba984\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jacob\\AppData\\Local\\Temp\\pip-install-clca5gs3\\rebound_a19ceff23d4844dfb1d9ce4d08fba984\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Jacob\AppData\Local\Temp\pip-record-8w1f5up7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jacob\appdata\local\programs\python\python39\Include\rebound'
         cwd: C:\Users\Jacob\AppData\Local\Temp\pip-install-clca5gs3\rebound_a19ceff23d4844dfb1d9ce4d08fba984\
    Complete output (27 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\rebound
    copying rebound\citations.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\data.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\horizons.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\interruptible_pool.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\particle.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\plotting.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\simulation.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\simulationarchive.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\tools.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\units.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\widget.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\__init__.py -> build\lib.win-amd64-3.9\rebound
    copying rebound\rebound.h -> build\lib.win-amd64-3.9\rebound
    running build_ext
    building 'librebound' extension
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DLIBREBOUND -Isrc -Ic:\users\jacob\appdata\local\programs\python\python39\include -Ic:\users\jacob\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcsrc/binarydiff.c /Fobuild\temp.win-amd64-3.9\Release\src/binarydiff.obj -fstrict-aliasing -O3 -std=c99 -Wno-unknown-pragmas -DGITHASH=eb1f3890ab7f01487de2b3d01c42c1acdfd9d5e5 -DLIBREBOUND -D_GNU_SOURCE -fPIC
    cl : Wiersz polecenia error D8021 : nieprawid\x88owy argument numeryczny "/Wno-unknown-pragmas"
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\jacob\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jacob\\AppData\\Local\\Temp\\pip-install-clca5gs3\\rebound_a19ceff23d4844dfb1d9ce4d08fba984\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jacob\\AppData\\Local\\Temp\\pip-install-clca5gs3\\rebound_a19ceff23d4844dfb1d9ce4d08fba984\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Jacob\AppData\Local\Temp\pip-record-8w1f5up7\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jacob\appdata\local\programs\python\python39\Include\rebound' Check the logs for full command output.

Any idea what is the problem? It's clearly connected with MSVC. At the beginning there was an error which required MSVC ver. 14 or higher to be installed. After I've installed MSVC, above error occures.

Python ver. 3.9 pip ver. 21.0

1 Answers
Related