Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails on fedora 35 at complilation with gcc #20

Closed
Archehandoro opened this issue Nov 4, 2021 · 4 comments
Closed

Installation fails on fedora 35 at complilation with gcc #20

Archehandoro opened this issue Nov 4, 2021 · 4 comments

Comments

@Archehandoro
Copy link

Processing dependencies for hs-test-python==6.0.0
Searching for psutil==5.8.0
Reading https://pypi.org/simple/psutil/
Downloading
https://files.pythonhosted.org/packages/e1/b0/7276de53321c12981717490516b7e612364f2cb372ee8901bd4a66a000d7/psutil-5.8.0.tar.gz#sha256=0c9ccb99ab76025f2f0bbecf341d4656e9c1351db8cc8a03ccd62e318ab4b5c6
Best match: psutil 5.8.0
Processing psutil-5.8.0.tar.gz
Writing /tmp/easy_install-vfzzyes_/psutil-5.8.0/setup.cfg
Running psutil-5.8.0/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-vfzzyes_/psutil-5.8.0/egg-dist-tmp-b7j6nyl7
psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or
directory
9 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: Setup script exited with error: command '/usr/bin/gcc' failed
with exit code 1

@aaaaaa2493
Copy link

@Archehandoro Hi! Do you have Python 3.10 installed? Currently, psutil is not supported in Python 3.10, and since hs-test-python is using such dependency, we do not support Python 3.10 as well. In this case, I suggest temporarily using 3.9 or lower at the moment.

giampaolo/psutil#1994

@Archehandoro
Copy link
Author

@aaaaaa2493 Hi! Actually I do, it must be the default version in fedora 35. However, it won't install on my venv on 3.9 either. Could it be the venv got updated to version 3.10 as well?

@aaaaaa2493
Copy link

aaaaaa2493 commented Nov 5, 2021

@Archehandoro If you use pip to install dependencies, check that you are using the correct version of pip that points to your Python 3.9.

E.g. in your case:
pip install ... installs using pip from Python 2
pip3 install ... installs using pip from Python 3.10
pip3.9 install ... installs using pip from Python 3.9

If you do not have an appropriate pip installed, you need to run the command dnf install python3.9-pip or python3.9 -m pip install pip.

Also, before installing the dependencies, make sure you have activated your virtual environment.

@aaaaaa2493
Copy link

@Archehandoro Hi! I've implemented a fix that works while psutil is not able to update to Python 3.10. You can use Python 3.10 to solve projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants