I have troubles installing Pystan in Python 3.10 on my Ubuntu 20.04 system. I have already tried all the possible troubleshooting, as well as e.g. a similar issue (Error installing Pystan in python 3.10 with gcc 9.2.0).
This is the error message I receive when I run the following command: sudo pip install pystan
Building wheels for collected packages: pysimdjson
Building wheel for pysimdjson (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
/home/anvlo/PycharmProjects/PhD/venv/lib/python3.10/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
/home/anvlo/PycharmProjects/PhD/venv/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/simdjson
copying simdjson/__init__.py -> build/lib.linux-x86_64-cpython-310/simdjson
running build_ext
building 'csimdjson' extension
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/simdjson
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-install-1dmgbq2u/pysimdjson_aa6a3887b90247e2bca76445194b5d1f/.eggs/pybind11-2.10.0-py3.10.egg/pybind11/include -I/home/anvlo/PycharmProjects/PhD/venv/include -I/usr/include/python3.10 -c simdjson/binding.cpp -o build/temp.linux-x86_64-cpython-310/simdjson/binding.o -std=c++11
In file included from /tmp/pip-install-1dmgbq2u/pysimdjson_aa6a3887b90247e2bca76445194b5d1f/.eggs/pybind11-2.10.0-py3.10.egg/pybind11/include/pybind11/detail/../attr.h:13,
from /tmp/pip-install-1dmgbq2u/pysimdjson_aa6a3887b90247e2bca76445194b5d1f/.eggs/pybind11-2.10.0-py3.10.egg/pybind11/include/pybind11/detail/class.h:12,
from /tmp/pip-install-1dmgbq2u/pysimdjson_aa6a3887b90247e2bca76445194b5d1f/.eggs/pybind11-2.10.0-py3.10.egg/pybind11/include/pybind11/pybind11.h:13,
from simdjson/binding.cpp:7:
/tmp/pip-install-1dmgbq2u/pysimdjson_aa6a3887b90247e2bca76445194b5d1f/.eggs/pybind11-2.10.0-py3.10.egg/pybind11/include/pybind11/detail/../detail/common.h:212:10: fatal error: Python.h: No such file or directory
212 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pysimdjson
Running setup.py clean for pysimdjson
Failed to build pysimdjson
Installing collected packages: pysimdjson, clikit, httpstan, pystan
Attempting uninstall: pysimdjson
Found existing installation: pysimdjson 5.0.2
Uninstalling pysimdjson-5.0.2:
Successfully uninstalled pysimdjson-5.0.2
Running setup.py install for pysimdjson ... error
I have already tried to install Cmake
, I have updated pip
, setuptools
, tried downloading pystan
in python 3.9, all render the same error.
Thanks in advance for the help!