-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
install psutil with pip on python3.6 gives this error
I've tried installing different versions of psutil with the same error
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-_0xq2q7o/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-k4askr37-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-_0xq2q7o/psutil/
vhoulbreque, agamenonam, cemanughian, WsevoL0D, okeeffdp and 18 more
Activity
sethmlarson commentedon Oct 4, 2017
Can you post the install log that pip complains with here?
KorewaKiyo commentedon Oct 6, 2017
https://hastebin.com/aqebodemej.sql
Tommatheussen commentedon Oct 6, 2017
I'm having the same problem, using python 3.5.4 on Ubuntu 14.04, install logs below:
EDIT: I just updated from python 3.4.3, which did correctly install
kyb3r commentedon Oct 6, 2017
Same issue for me:
giampaolo commentedon Oct 6, 2017
You guys need Python header files. On Ubuntu:
sudo apt-get install python-dev
.On RedHat like distros it should be
sudo yum install python-devel
.Tommatheussen commentedon Oct 6, 2017
I was just about to comment the same, after I read the install file: https://github.com/giampaolo/psutil/blob/master/INSTALL.rst
However, if you have multiple versions installed (like me, I have python 3.4.3 and 3.5.4 installed), you need to specify a more granular version, like so:
sudo apt-get install python3.5-dev
After that, it installed without issues
KorewaKiyo commentedon Oct 6, 2017
Thanks that worked!
rdhara commentedon Jun 15, 2018
@Tommatheussen Thank you that worked for me as well!
gnarizzy commentedon Jun 18, 2018
One more note that may be useful other people with this issue:
I'm using a RedHat distro and Python 2.7, and
sudo yum install python-devel
wasn't resolving the issue. I eventually realized it was because, for some reason, that installed python-devel for Python 2.6.After a bit of googling I was able to resolve this issue with
sudo yum install python27-devel.x86_64
, which installed python_devel for Python 2.7 after whichpip install psutil
succeeded.lain0 commentedon Jul 20, 2018
ubuntu 16.04 i helped
AlexGagea commentedon Dec 6, 2018
Great man. Thank you !
18 remaining items
fvmitnick commentedon Feb 27, 2020
thx man, really help !
falconsoft3d commentedon Mar 7, 2020
Thank you very much. it served me
igunultas commentedon Mar 20, 2020
if you guys still have this issue just install gcc to your server
Jerrisk commentedon Apr 23, 2020
if you try exec pip3 install lmdb , you can try yum install python3-devel
enliktjioe commentedon Apr 27, 2020
thank you, it solves the issue :)
PoplarYang commentedon Jun 5, 2020
OS: CentOS Linux release 8.0.1905 (Core)
Python: 3.6
Clues:
SystemExit: error: command 'gcc' failed with exit status 1
Problem solved.
vijayendra-tripathi commentedon Jun 18, 2020
For python 3+:
sudo yum install python3-devel.x86_64
AhmadAbdallah13 commentedon Jun 20, 2020
I'm using Windows 10 how can I resolve this issue please?
giampaolo commentedon Jun 20, 2020
Look at the previous comments, in particular #1143 (comment). On Windows you don't need to do that as
pip
will simply get the wheels/binaries instead of the tarball. I'm going to lock this conversation as there's already a solution and produces too many comments.