Building wheel for box2d-py (setup.py) ... error
ERROR: Command errored out with exit status 1:
ERROR:
Building wheel for box2d-py (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/hsy/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fnnlwo2g/box2d-py_6948c8f752ad42eca50020e1ea466ebc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fnnlwo2g/box2d-py_6948c8f752ad42eca50020e1ea466ebc/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 /tmp/pip-wheel-pqfze13u
cwd: /tmp/pip-install-fnnlwo2g/box2d-py_6948c8f752ad42eca50020e1ea466ebc/
Complete output (16 lines):
Using setuptools (version 58.0.4).
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/Box2D
copying library/Box2D/__init__.py -> build/lib.linux-x86_64-3.9/Box2D
copying library/Box2D/Box2D.py -> build/lib.linux-x86_64-3.9/Box2D
creating build/lib.linux-x86_64-3.9/Box2D/b2
copying library/Box2D/b2/__init__.py -> build/lib.linux-x86_64-3.9/Box2D/b2
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
error: command 'swig' failed: No such file or directory
----------------------------------------
ERROR: Failed building wheel for box2d-py
Running setup.py clean for box2d-py
Failed to build box2d-py
Installing collected packages: box2d-py
Running setup.py install for box2d-py ... error
ERROR: Command errored out with exit status 1:
command: /home/hsy/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fnnlwo2g/box2d-py_6948c8f752ad42eca50020e1ea466ebc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fnnlwo2g/box2d-py_6948c8f752ad42eca50020e1ea466ebc/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 /tmp/pip-record-jsd27xvl/install-record.txt --single-version-externally-managed --compile --install-headers /home/hsy/anaconda3/include/python3.9/box2d-py
cwd: /tmp/pip-install-fnnlwo2g/box2d-py_6948c8f752ad42eca50020e1ea466ebc/
Complete output (16 lines):
Using setuptools (version 58.0.4).
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/Box2D
copying library/Box2D/__init__.py -> build/lib.linux-x86_64-3.9/Box2D
copying library/Box2D/Box2D.py -> build/lib.linux-x86_64-3.9/Box2D
creating build/lib.linux-x86_64-3.9/Box2D/b2
copying library/Box2D/b2/__init__.py -> build/lib.linux-x86_64-3.9/Box2D/b2
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D/Box2D.i to Box2D/Box2D_wrap.cpp
swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
error: command 'swig' failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: /home/hsy/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fnnlwo2g/box2d-py_6948c8f752ad42eca50020e1ea466ebc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fnnlwo2g/box2d-py_6948c8f752ad42eca50020e1ea466ebc/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 /tmp/pip-record-jsd27xvl/install-record.txt --single-version-externally-managed --compile --install-headers /home/hsy/anaconda3/include/python3.9/box2d-py Check the logs for full command output.
sloution:
run:
sudo apt-get install swig build-essential python-dev python3-dev
then run
pip3 install box2d-py -i https://pypi.tuna.tsinghua.edu.cn/simple
source:
https://stackoverflow.com/questions/51811263/problems-pip-installing-box2d