* Okko Willeboordse <[email protected]> [2015-09-22 21:30:28 +0200]: > import psutil > > Gives; [F0401] Unable to import 'psutil'
Works fine here:
$ virtualenv .venv2
Running virtualenv with interpreter /usr/bin/python2
New python executable in .venv2/bin/python2
Also creating executable in .venv2/bin/python
Installing setuptools, pip...done.
$ source .venv2/bin/activate
$ pip install psutil pylint
Downloading/unpacking pylint
Downloading pylint-1.4.4-py2.py3-none-any.whl (428kB): 428kB downloaded
Downloading/unpacking psutil
Downloading psutil-3.2.1.tar.gz (251kB): 251kB downloaded
[...]
Downloading/unpacking six (from pylint)
Downloading six-1.9.0-py2.py3-none-any.whl
Downloading/unpacking astroid>=1.3.6 (from pylint)
Downloading astroid-1.3.8-py2.py3-none-any.whl (183kB): 183kB downloaded
Downloading/unpacking logilab-common>=0.53.0 (from pylint)
Downloading logilab-common-1.0.2.tar.gz (190kB): 190kB downloaded
[...]
$ echo 'import psutil' > foo.py
$ pylint foo.py -rn
No config file found, using default configuration
************* Module foo
C: 1, 0: Black listed name "foo" (blacklisted-name)
C: 1, 0: Missing module docstring (missing-docstring)
W: 1, 0: Unused import psutil (unused-import)
It sounds like the python your pylint is installed for doesn't have
the psutil package (e.g. because you run your code in a virtualenv
typically, but use a system-wide pylint package).
Florian
--
http://www.the-compiler.org | [email protected] (Mail/XMPP)
GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
I love long mails! | http://email.is-not-s.ms/
signature.asc
Description: Digital signature
_______________________________________________ code-quality mailing list [email protected] https://mail.python.org/mailman/listinfo/code-quality
