debian - unable to update python package psutil -
when check version of psutil in python says have version 0.5.0
:
$ uname -a linux mypc 3.2.0-4-amd64 #1 smp debian 3.2.60-1+deb7u3 x86_64 gnu/linux $ python python 2.7.3 (default, mar 13 2014, 11:03:55) [gcc 4.7.2] on linux2 type "help", "copyright", "credits" or "license" more information. >>> import psutil >>> psutil.__version__ '0.5.0' >>> psutil.virtual_memory() traceback (most recent call last): file "<stdin>", line 1, in <module> attributeerror: 'module' object has no attribute 'virtual_memory' >>> psutil.__file__ '/usr/lib/pymodules/python2.7/psutil/__init__.pyc'
i want upgrade newer version of psutil has virtual_memory()
method:
$ sudo pip install 'psutil==2.2.1' --upgrade requirement up-to-date: psutil==2.2.1 in /usr/local/lib/python2.7/dist-packages cleaning up...
the 2 different paths same package imply psutil
installed twice:
/usr/local/lib/python2.7/dist-packages /usr/lib/pymodules/python2.7/psutil/__init__.pyc
i want psutil
version 2.2.1
. best way clean other unwanted 0.5.0
package , keep later one?
as per comments - checking if either of above paths installed through dpkg
:
$ dpkg -s /usr/local/lib/python2.7/dist-packages dpkg-query: no path found matching pattern /usr/local/lib/python2.7/dist-packages $ dpkg -s /usr/lib/pymodules/python2.7/psutil/__init__.pyc dpkg-query: no path found matching pattern /usr/lib/pymodules/python2.7/psutil/__init__.pyc
remove versions of psutil
, install 2.2.1
again:
$ sudo pip uninstall psutil uninstalling psutil: /usr/local/lib/python2.7/dist-packages/_psutil_linux.so /usr/local/lib/python2.7/dist-packages/_psutil_posix.so /usr/local/lib/python2.7/dist-packages/psutil /usr/local/lib/python2.7/dist-packages/psutil-2.2.1.egg-info proceed (y/n)? y uninstalled psutil $ sudo apt-get remove --purge python-psutil reading package lists... done building dependency tree reading state information... done following packages removed: python-psutil* 0 upgraded, 0 newly installed, 1 remove , 294 not upgraded. after operation, 215 kb disk space freed. want continue [y/n]? y (reading database ... 183978 files , directories installed.) removing python-psutil ... processing triggers python-support ... $ sudo pip install 'psutil==2.2.1' downloading/unpacking psutil==2.2.1 downloading psutil-2.2.1.tar.gz (223kb): 223kb downloaded running setup.py egg_info package psutil warning: no previously-included files matching '*' found under directory 'docs/_build' installing collected packages: psutil running setup.py install psutil building '_psutil_linux' extension gcc -pthread -fno-strict-aliasing -dndebug -g -fwrapv -o2 -wall -wstrict-prototypes -fpic -dpsutil_version=221 -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 warning: no previously-included files matching '*' found under directory 'docs/_build' installed psutil cleaning up... $ python python 2.7.3 (default, mar 13 2014, 11:03:55) [gcc 4.7.2] on linux2 type "help", "copyright", "credits" or "license" more information. >>> import psutil >>> psutil.__version__ '2.2.1' >>> psutil.__file__ '/usr/local/lib/python2.7/dist-packages/psutil/__init__.pyc'
Comments
Post a Comment