Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #12530

Re: issues installing psutil with pip in virtual environment

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Sandro Tosi <morph@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: issues installing psutil with pip in virtual environment
Date Sun, 26 Apr 2020 18:40:01 +0200
Message-ID <zZStX-35n-1@gated-at.bofh.it> (permalink)
References <zZSki-322-11@gated-at.bofh.it>
X-Original-To Anil F Duggirala <anilduggirala@fastmail.fm>
X-Mailbox-Line From debian-python-request@lists.debian.org Sun Apr 26 16:33:51 2020
Old-Return-Path <sandro.tosi@gmail.com>
X-Amavis-Spam-Status No, score=-6.502 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=ham autolearn_force=no
X-Policyd-Weight NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-qv1-f67.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UH9l0Yrac/LvoeZHwJtWKUk/6Mssc5SO0I0d17Tud4A=; b=WPc3uwqF1yAOhi2crFfQGIMX5ReGKuzwGlO3bmT7DdQd+LUMNgCJNHPYQg2Q8JFc5+ C3JDv8W9wxUwI1o7doCH6f+aFNMQGlZPzgTytmF2tXt1xmES6HmjjGgDak/YSbuJoBkX m064n+nFa/MZYqjtzzvCQmRrhVQZ9E5qGEkZyM05q6BJMNjdtv1s3QUqhuHG7Dn6pFhm RpHWmNL4n49OOUmgAqond6dslCTQsEgC6xVHjeYbbzTF/51XLUKQPxSvSJlQzcN/dRn7 BzfxgQjnQRb+RJoBDL/OAbgyVsIo4PV91qePHnqaOYx9V5dZ5pK/fjxNBPRXr3UnCTki dPfA==
X-Gm-Message-State AGi0PuaPLIzgIeydLqZ+WUQ0HuVrdtjlabYXqNv8XwG2WIZ6NTHRRYc3 WH+78nYpKtGRJnVbxznpZKbZn0mJribIHyK1quM=
X-Google-SMTP-Source APiQypK9cM1jGBbK5eTsb6oakPtGdK0sOrqXWcZK9wT6XMPgd0uBFXtID2uHxrUG0PEF0n/eOI6bQDfH+aXQ2EEbg10=
X-Received by 2002:a0c:e787:: with SMTP id x7mr18249571qvn.229.1587918815355; Sun, 26 Apr 2020 09:33:35 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Mailing-List <debian-python@lists.debian.org> archive/latest/18213
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/CAB4XWXxixK4LbHM1k1bZpZixh5d2soCxzBn+HxUnhg3RMQAKQg@mail.gmail.com
Approved robomod@news.nic.it
Lines 39
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc debian-python <debian-python@lists.debian.org>
X-Original-Date Sun, 26 Apr 2020 12:33:09 -0400
X-Original-Message-ID <CAB4XWXxixK4LbHM1k1bZpZixh5d2soCxzBn+HxUnhg3RMQAKQg@mail.gmail.com>
X-Original-References <1f5f91b2f030c2e939cef48b03b5991cdb060532.camel@fastmail.fm>
Xref csiph.com linux.debian.maint.python:12530

Show key headers only | View raw


> 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

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

issues installing psutil with pip in virtual environment Anil F Duggirala <anilduggirala@fastmail.fm> - 2020-04-26 18:30 +0200
  Re: issues installing psutil with pip in virtual environment Sandro Tosi <morph@debian.org> - 2020-04-26 18:40 +0200
  Re: issues installing psutil with pip in virtual environment Scott Kitterman <debian@kitterman.com> - 2020-04-26 18:40 +0200

csiph-web