pupy
pupy copied to clipboard
ImportError: No module named psutil
Hello,
I've setup a pupy environment with build-docker-images.sh
, then launched pupy server in docker.
But when I run modules in active shell, I get this
[*] Session 1 opened ([email protected]) (172.17.0.1:48998)
>> ip
2022-07-16 00:08:42,689| Path contains binary objects: _psutil_posix.so (query=psutil)
[!] Load pupyps failed: Exception: No module named psutil
Traceback (most recent call last):
ImportError: No module named psutil
[!] Error loading package pupyps (pupyps.pyo pkg=False)
Traceback (most recent call last):
ImportError: No module named psutil
2022-07-16 00:08:42,749| No module named psutil
========= Remote Traceback (1) =========
Traceback (most recent call last):
ImportError: No module named psutil
Traceback (most recent call last):
File "/opt/pupy/modules/ip.py", line 24, in run
interfaces = self.client.remote('pupyps', 'interfaces')
File "/opt/pupy/pupylib/PupyClient.py", line 240, in remote
remote_module = getattr(self.conn.modules, module)
File "/opt/pupy/network/lib/rpc/core/netref.py", line 161, in __getattribute__
return syncreq(self, consts.HANDLE_GETATTR, name)
File "/opt/pupy/network/lib/rpc/core/netref.py", line 74, in syncreq
return conn.sync_request(handler, oid, *args)
File "/opt/pupy/network/lib/connection.py", line 423, in sync_request
raise obj
ImportError: No module named psutil
========= Remote Traceback (1) =========
Traceback (most recent call last):
ImportError: No module named psutil
>>
>> load_package psutil
2022-07-16 00:27:00,410| Path contains binary objects: _psutil_posix.so (query=psutil)
2022-07-16 00:27:00,413| Module not found: psutil
Traceback (most recent call last):
File "/opt/pupy/pupylib/PupyJob.py", line 165, in module_worker
module.run(self.args)
File "/opt/pupy/modules/load_package.py", line 36, in run
if self.client.load_package(args.package, force=args.force):
File "/opt/pupy/pupylib/PupyClient.py", line 479, in load_package
raise ValueError('Module not found: {}'.format(e))
ValueError: Module not found: psutil
[-] Module not found: psutil
>>
If I try to import psutil inside docker contaner with pupy's server, it works fine
pupy@9fa109b9993d:/opt/pupy$ python
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>>
What's the problem here, how to debug?
Thanks
found this in build-docker-images.sh
log
[+] Install psutil
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Requirement already satisfied: psutil==4.3.1 in c:\python27\lib\site-packages (4.3.1)
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting psutil
Using cached psutil-5.9.1.tar.gz (479 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Python27\python.exe' 'C:\Python27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users\root\temp\pip-build-env-gnkiya\overlay' --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (7 lines):
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting setuptools>=40.8.0
Using cached setuptools-44.1.1.zip (858 kB)
Collecting wheel
Using cached wheel-0.37.1.tar.gz (66 kB)
ERROR: Could not install packages due to an EnvironmentError: [Errno 22] invalid mode ('wb') or filename: 'c:\\users\\root\\temp\\pip-install-_znxyv\\wheel\\tests/testdata/unicode.dist/unicodedist/\xe5\xe4\xf6_???.py'
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Python27\python.exe' 'C:\Python27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users\root\temp\pip-build-env-gnkiya\overlay' --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
here is the fix https://github.com/n1nj4sec/pupy/compare/unstable...fastchain:pupy:patch-1
can you please help me with this I also set this up on docker but it is not working for me