Psutil importerror


#1

What dashboard are you using? (Web, iOS, Android)
None


Please describe the bug / issue. Attaching any relevant screenshots would be very helpful!

patrick@raspberrypi:~ $ sudo -H python3 -m myDevices -P /var/run/myDevices.pid
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.4/dist-packages/myDevices-0.1.20741-py3.4.egg/myDevices/__main__.py", line 3, in <module>
    from myDevices.cloud.client import CloudServerClient
  File "/usr/local/lib/python3.4/dist-packages/myDevices-0.1.20741-py3.4.egg/myDevices/cloud/client.py", line 13, in <module>
    from myDevices.remoteaccess import RemoteDesktop
  File "/usr/local/lib/python3.4/dist-packages/myDevices-0.1.20741-py3.4.egg/myDevices/remoteaccess/__init__.py", line 6, in <module>
    from myDevices.os.services import ServiceManager
  File "/usr/local/lib/python3.4/dist-packages/myDevices-0.1.20741-py3.4.egg/myDevices/os/services.py", line 4, in <module>
    from psutil import Process, get_pid_list, phymem_usage, cpu_percent
ImportError: cannot import name 'get_pid_list'

#2
patrick@raspberrypi:~ $ sudo -H pip3 install -U psutil
Requirement already up-to-date: psutil in /usr/local/lib/python3.4/dist-packages


patrick@raspberrypi:~ $ python3
Python 3.4.2 (default, Oct 19 2014, 13:31:11) 
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.version_info
(4, 3, 1)

#3

Might be worth installing psutil for python 2. Looks like from the error message everything is going python 3 but you can see the error is on exec(code, run_globals) which may run as python 2. @eptak any suggestions?


#4

from what I gather from HTOP, it is running on Python3 automagicly. How can I change this to python 2?