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