[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: issues installing psutil with pip in virtual environment



> I am running into an issue installing psutil: pip3 install psutil, in a
> virtual environment. I have upgraded my pip and setuptools with no
> avail. I am getting this error: https://pastebin.com/2Xb7UN9g

psutil is not pure python, and contains some extensions that need to
be compiled, so your system needs to have a compiler, gcc, installed;
since it's not you get "unable to execute 'x86_64-linux-gnu-gcc': No
such file or directory"

> Some have suggested installing the python3-dev package. Saying that I
> require "header" files (don't know what those are). So this means
> installing that package and creating a new venv, where those files are
> available. Is there a way to make this install work without installing
> that package? Is that package really necessary? Does this mean my

you will necessarily need to install python3-dev

> virtual environments are somehow subject to what libraries are
> available in my system python installation?

yes, in a similar way as they are dependent on the system interpreter
to create and run the venv

> Is there some pip
> installabel package that provides these files?

some packages on PyPI provide binary releases, but psutil looks like
it doesnt for linux, so you need to compile it.

alternatively you can install python3-psutil on your host and then
"virtualenv --system-site-packages" to use the system-available
modules.

Regards,
-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
Twitter: https://twitter.com/sandrotosi


Reply to: