ptop
ptop copied to clipboard
Can't install ptop on CentOS 7
Hi,
I am trying to install ptop on CentOS 7 without success. The error I am getting is:
psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-install-aKSv9b/psutil/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-XEO958/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-aKSv9b/psutil/
I understand that it says I need Python.h but there is no one. With what should it be comming?
EDIT: I have tried with yum install python34-devel but I get the same error.
Can you please try installing python2-dev or python3-dev and then installing ptop after that ?
On Mon, Feb 25, 2019, 3:02 PM Antonio Halužan <[email protected] wrote:
Hi,
I am trying to install ptop on CentOS 7 without success. The error I am getting is:
psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-install-aKSv9b/psutil/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-XEO958/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-aKSv9b/psutil/
I understand that it says I need Python.h but there is no one. With what should it be comming?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/darxtrix/ptop/issues/57, or mute the thread https://github.com/notifications/unsubscribe-auth/AFBRkbh9uy85M0xk8sRcDvxD1PBtswqEks5vQ62wgaJpZM4bPcc5 .
I get:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting python3-dev Could not find a version that satisfies the requirement python3-dev (from versions: ) No matching distribution found for python3-dev
when I try both pip install python2-dev and pip install python3-dev
Okay, can you try a few options listed here https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory
On Mon, Feb 25, 2019, 3:54 PM Antonio Halužan <[email protected] wrote:
I get:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting python3-dev Could not find a version that satisfies the requirement python3-dev (from versions: ) No matching distribution found for python3-dev
when I try both pip install python2-dev and pip install python3-dev
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/darxtrix/ptop/issues/57#issuecomment-466957609, or mute the thread https://github.com/notifications/unsubscribe-auth/AFBRkWfCQ410WrYNWq7pr8HO8NVP5ZsWks5vQ7nbgaJpZM4bPcc5 .
Sorry for long response. I have tried with suggestions from the link you provided:
yum install python-devel
and
yum install python34-devel
but I still have the same error.
Okay, Try instaling pip3 ( python3 pip) and then do a pip3 install ptop
and let me know if that does not work.