Not able to run psutil

1,281 views
Skip to first unread message

xiscu

unread,
Aug 25, 2012, 5:05:37 AM8/25/12
to psutil
Dear psutil-Team,
I've just installed psutil:

~$ pip install psutil
Downloading/unpacking psutil
Downloading psutil-0.6.1.tar.gz (138Kb): 138Kb downloaded
Running setup.py egg_info for package psutil

Installing collected packages: psutil
Running setup.py install for psutil
building '_psutil_linux' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -
Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c psutil/
_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro
build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o -o build/lib.linux-
x86_64-2.7/_psutil_linux.so
building '_psutil_posix' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -
Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c psutil/
_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro
build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o -o build/lib.linux-
x86_64-2.7/_psutil_posix.so

Successfully installed psutil
Cleaning up...

Then I tried in IDLE but I'm not getting the tool working:

~$ python
Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named psutil

The system is:
~$ uname -a
Linux random 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64
GNU/Linux


Thanks in advance!

xiscu

Giampaolo Rodolà

unread,
Aug 25, 2012, 12:39:00 PM8/25/12
to psu...@googlegroups.com
Have you tried the actual Python interpreter rather than passing via IDLE?

2012/8/25 xiscu <xi...@email.de>:
> --
> You received this message because you are subscribed to the "Python process utilities (psutil)" project group:
> http://code.google.com/p/psutil
> To post to this group, send email to psu...@googlegroups.com
> To unsubscribe from this group, send email to psutil-un...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/psutil

xiscu

unread,
Aug 26, 2012, 4:46:45 AM8/26/12
to psu...@googlegroups.com
On 08/25/2012 06:39 PM, Giampaolo Rodol� wrote:
> Have you tried the actual Python interpreter rather than passing via IDLE?
>
>
Same result :-(

$ python3.2
Python 3.2.3 (default, Jun 25 2012, 23:10:56)
[GCC 4.7.1] on linux2

Giampaolo Rodolà

unread,
Aug 26, 2012, 11:24:44 AM8/26/12
to psu...@googlegroups.com
Make sure what python version "pip" command points to.
Here it seems you're using python 3.2 while in your first message
"pip" seemed to point to python 2.7.
I'm almost sure this is not a problem with psutil but with how you install libs.
Also, consider not using pip at all and instead install psutil from
its sources (python setup.py install)

2012/8/26 xiscu <xi...@email.de>:

xiscu

unread,
Aug 27, 2012, 1:13:51 PM8/27/12
to psu...@googlegroups.com
On 08/26/2012 05:24 PM, Giampaolo Rodol� wrote:
> Here it seems you're using python 3.2 while in your first message
> "pip" seemed to point to python 2.7.
Well I just tried with 3.2 as you said:
"""

Have you tried the actual Python interpreter rather than passing via IDLE?

"""
and undestood "actual" as 3.2 (well now it'll be 3.3)


xiscu

unread,
Aug 27, 2012, 1:22:57 PM8/27/12
to psu...@googlegroups.com
On 08/26/2012 05:24 PM, Giampaolo Rodol� wrote:
> I'm almost sure this is not a problem with psutil but with how you install libs.
> Also, consider not using pip at all and instead install psutil from
> its sources (python setup.py install)
>
Ok I've tried manually:
root@random:/home/ci/Downloads/psutil-0.6.1# dir
CREDITS HISTORY LICENSE PKG-INFO psutil.egg-info setup.cfg test
examples INSTALL MANIFEST.in psutil README setup.py
root@random:/home/ci/Downloads/psutil-0.6.1# python setup.py install
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support
.pth files
running bdist_egg
running egg_info
writing psutil.egg-info/PKG-INFO
writing top-level names to psutil.egg-info/top_level.txt
writing dependency_links to psutil.egg-info/dependency_links.txt
reading manifest file 'psutil.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'psutil.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/psutil
copying psutil/_compat.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_psbsd.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_common.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/error.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_psposix.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_psmswindows.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/__init__.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_psosx.py -> build/lib.linux-x86_64-2.7/psutil
copying psutil/_pslinux.py -> build/lib.linux-x86_64-2.7/psutil
running build_ext
building '_psutil_linux' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/psutil
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c
psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro
build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o -o
build/lib.linux-x86_64-2.7/_psutil_linux.so
building '_psutil_posix' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c
psutil/_psutil_posix.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro
build/temp.linux-x86_64-2.7/psutil/_psutil_posix.o -o
build/lib.linux-x86_64-2.7/_psutil_posix.so
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/_psutil_posix.so ->
build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.7/_psutil_linux.so ->
build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/psutil
copying build/lib.linux-x86_64-2.7/psutil/_compat.py ->
build/bdist.linux-x86_64/egg/psutil
copying build/lib.linux-x86_64-2.7/psutil/_psbsd.py ->
build/bdist.linux-x86_64/egg/psutil
copying build/lib.linux-x86_64-2.7/psutil/_common.py ->
build/bdist.linux-x86_64/egg/psutil
copying build/lib.linux-x86_64-2.7/psutil/error.py ->
build/bdist.linux-x86_64/egg/psutil
copying build/lib.linux-x86_64-2.7/psutil/_psposix.py ->
build/bdist.linux-x86_64/egg/psutil
copying build/lib.linux-x86_64-2.7/psutil/_psmswindows.py ->
build/bdist.linux-x86_64/egg/psutil
copying build/lib.linux-x86_64-2.7/psutil/__init__.py ->
build/bdist.linux-x86_64/egg/psutil
copying build/lib.linux-x86_64-2.7/psutil/_psosx.py ->
build/bdist.linux-x86_64/egg/psutil
copying build/lib.linux-x86_64-2.7/psutil/_pslinux.py ->
build/bdist.linux-x86_64/egg/psutil
byte-compiling build/bdist.linux-x86_64/egg/psutil/_compat.py to _compat.pyc
byte-compiling build/bdist.linux-x86_64/egg/psutil/_psbsd.py to _psbsd.pyc
byte-compiling build/bdist.linux-x86_64/egg/psutil/_common.py to _common.pyc
byte-compiling build/bdist.linux-x86_64/egg/psutil/error.py to error.pyc
byte-compiling build/bdist.linux-x86_64/egg/psutil/_psposix.py to
_psposix.pyc
byte-compiling build/bdist.linux-x86_64/egg/psutil/_psmswindows.py to
_psmswindows.pyc
byte-compiling build/bdist.linux-x86_64/egg/psutil/__init__.py to
__init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/psutil/_psosx.py to _psosx.pyc
byte-compiling build/bdist.linux-x86_64/egg/psutil/_pslinux.py to
_pslinux.pyc
creating stub loader for _psutil_linux.so
creating stub loader for _psutil_posix.so
byte-compiling build/bdist.linux-x86_64/egg/_psutil_linux.py to
_psutil_linux.pyc
byte-compiling build/bdist.linux-x86_64/egg/_psutil_posix.py to
_psutil_posix.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying psutil.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying psutil.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying psutil.egg-info/dependency_links.txt ->
build/bdist.linux-x86_64/egg/EGG-INFO
copying psutil.egg-info/top_level.txt ->
build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/psutil-0.6.1-py2.7-linux-x86_64.egg' and adding
'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing psutil-0.6.1-py2.7-linux-x86_64.egg
creating
/usr/local/lib/python2.7/dist-packages/psutil-0.6.1-py2.7-linux-x86_64.egg
Extracting psutil-0.6.1-py2.7-linux-x86_64.egg to
/usr/local/lib/python2.7/dist-packages
Adding psutil 0.6.1 to easy-install.pth file

Installed
/usr/local/lib/python2.7/dist-packages/psutil-0.6.1-py2.7-linux-x86_64.egg
Processing dependencies for psutil==0.6.1
Finished processing dependencies for psutil==0.6.1

then:

# python
Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>>
root@random:/home/ci/Downloads/psutil-0.6.1# exit
exit
ci@random:~$ python
Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named psutil
>>>

As root works but not as normal user (ci) ...

Any Idea?

Thanks!

xiscu


Reply all
Reply to author
Forward
0 new messages