psutil
psutil copied to clipboard
Wine support
- WINE 32 Bit, 4.3 devel
- psutil version 5.6.0
- python 3.7.2 32 Bit
psutil can not be imported :
>>> from psutil import pid_exists
File "c:\python3\lib\site-packages\psutil\__init__.py", line 141, in <module>
from . import _pswindows as _psplatform
File "c:\python3\lib\site-packages\psutil\_pswindows.py", line 17, in <module>
from . import _psutil_windows as cext
OSError: [WinError 127] Prozedur nicht gefunden: 'RtlIpv6AddressToStringA'
can You somehow switch off IPV6 by parameter on loading ? or any other solution ?
Mmm... I wonder if you have IPv6 support at all. Could you try this?
import socket
print(socket.has_ipv6)
print(hasattr(socket, "AF_INET6"))
>>> import socket
>>> print(socket.has_ipv6)
True
>>> print(hasattr(socket, "AF_INET6"))
True
I guess it would be good not to use RtlIpv6AddressToStringA, but do it yourself, to keep WINE compatibility, until they put that symbol into their dll
Could you please also try what happens with psutil 5.5.1 if you do this?
import socket, psutil
s = socket.socket(socket.AF_INET6)
s.bind(('::1', 0))
s.listen(5)
print(psutil.Process().connections())
On a system supporting the IPv6 stack it should print:
[pconn(fd=3, family=<AddressFamily.AF_INET6: 10>, type=<SocketKind.SOCK_STREAM: 1>, laddr=addr(ip='::1', port=8888), raddr=(), status='LISTEN')]
I downgraded my app to 5.5.1 and there I can import PSUTIL
>>> import socket, psutil
>>> s = socket.socket(socket.AF_INET6)
>>> s.bind(('::1', 8888))
>>> s.listen(5)
>>> print(psutil.Process().connections())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\python3\lib\site-packages\psutil\__init__.py", line 1260, in connections
return self._proc.connections(kind)
File "c:\python3\lib\site-packages\psutil\_pswindows.py", line 639, in wrapper
return fun(self, *args, **kwargs)
File "c:\python3\lib\site-packages\psutil\_pswindows.py", line 929, in connections
return net_connections(kind, _pid=self.pid)
File "c:\python3\lib\site-packages\psutil\_pswindows.py", line 329, in net_connections
rawlist = cext.net_connections(_pid, families, types)
OSError: [WinError 50] Anfrage nicht unterstützt
At least I can import PSUTIL and use other, non-IPV6 related functions !
dunno if You noticed my edit - bump ;-)
OK, thanks. I know what to do. I will work on a fix soon.
thats really great - a pleasure as always ;-)
OK, fixed. Do you have Visual Studio installed so that you can make sure latest GIT version works? If not I could send you a pre-compiled wheel (but I need the exact python version and whether it's 32 or 64 bit).
Dear Giampaolo, I compiled with VS2017 and installed on Wine 32 Bit, Python Version 3.7.2 - it works fine !!! thanks a lot !
Cool. ;)
FYI, I can import psutil now, and use the non-IPV6 functions as before - but IPV6 still seem not to work on WINE32 (what is not a problem, at least for me) :
>>> import socket, psutil
>>> print(socket.has_ipv6)
True
>>> print(hasattr(socket, "AF_INET6"))
True
>>> s = socket.socket(socket.AF_INET6)
>>> s.bind(('::1', 8888))
>>> s.listen(5)
>>> print(psutil.Process().connections())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\python3\lib\site-packages\psutil\__init__.py", line 1260, in connections
return self._proc.connections(kind)
File "c:\python3\lib\site-packages\psutil\_pswindows.py", line 639, in wrapper
return fun(self, *args, **kwargs)
File "c:\python3\lib\site-packages\psutil\_pswindows.py", line 929, in connections
return net_connections(kind, _pid=self.pid)
File "c:\python3\lib\site-packages\psutil\_pswindows.py", line 329, in net_connections
rawlist = cext.net_connections(_pid, families, types)
OSError: [WinError 50] Anfrage nicht unterstützt
when You are going to release 5.6.1, then I can clean my requirement.txt files ;-) ??? yours sincerely Robert
BTW, WINE Debug says:
012b:fixme:iphlpapi:GetExtendedTcpTable ulAf = 23 not supported
dunno if You really stick to that function, or if You are willing to work around ... yours sincerely Robert
File "c:\python3\lib\site-packages\psutil\_pswindows.py", line 929, in connections
return net_connections(kind, _pid=self.pid)
File "c:\python3\lib\site-packages\psutil\_pswindows.py", line 329, in net_connections
rawlist = cext.net_connections(_pid, families, types)
OSError: [WinError 50] Anfrage nicht unterstützt
Does this happen with latest GIT code?
Sorry, I checked twice and made a mistake !
>>> import socket, psutil
>>> psutil.version_info
(5, 6, 1)
>>> print(socket.has_ipv6)
True
>>> print(hasattr(socket, "AF_INET6"))
True
>>> s = socket.socket(socket.AF_INET6)
>>> s.bind(('::1', 8888))
>>> s.listen(5)
>>> print(psutil.Process().connections())
[]
all good ... ;-) except that IPV6 is not really working ;-) yours sincerely Robert
OK, then it's good. Unfortunately we cannot support IPv6 on Wine because RtlIpv6AddressToStringA Windows API is not supported, so we'll just skip IPv6 enumeration. It may make sense to file an issue on Wine bug tracker.
Also, on a totally different matter, this is probably the first time I receive a report about Wine. Could you please try python3 -m psutil.tests and put the output in a text file? I'm curious to see how psutil works on Wine.
sure, here it is - if You need more tests, just let me know ! If You really need to get IPV6 working on WINE, You might also use some other implementation from RtlIpv6AddressToStringA, for instance from reactos - but that is beyond my capabilities ...
c:\python3\>python -m psutil.tests
Traceback (most recent call last):
File "c:\python3\lib\runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "c:\python3\lib\runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "c:\python3\lib\runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "c:\install\psutil_win10_32bit_5.6.1_compiled\psutil-master5.6.1\psutil\t
ests\__init__.py", line 168, in <module>
HAS_MEMORY_FULL_INFO = 'uss' in psutil.Process().memory_full_info()._fields
File "c:\install\psutil_win10_32bit_5.6.1_compiled\psutil-master5.6.1\psutil\_
_init__.py", line 1186, in memory_full_info
return self._proc.memory_full_info()
File "c:\install\psutil_win10_32bit_5.6.1_compiled\psutil-master5.6.1\psutil\_
pswindows.py", line 661, in wrapper
return fun(self, *args, **kwargs)
File "c:\install\psutil_win10_32bit_5.6.1_compiled\psutil-master5.6.1\psutil\_
pswindows.py", line 800, in memory_full_info
uss = cext.proc_memory_uss(self.pid)
OSError: [WinError 87] Ungültiger Parameter
wineconsole: 01a1:fixme:virtual:NtQueryVirtualMemory (process=0xa0,addr=(nil)) Unimplemented information class: MemoryWorkingSetList
Tests don't start because they fail on import. You can comment that out and set HAS_MEMORY_FULL_INFO = False for now, just to make the test suite run. But I guess I'll have to install wine myself because I have the feeling there will be other issues. I've just installed Wine on Ubuntu. Could you provide some basic instructions on how to run python/psutil with it?
FWIW I filed a ticket on Wine bugtracker for RtlIpv6AddressToStringA: https://bugs.winehq.org/show_bug.cgi?id=46788
yes - I am sure the will be issues ;-) I use wine 32 Bit - and the recent python windows installer does not work. So I installed python on a windows 10 machine and just copied the installed python3 directory to wine - and it works perfectly! UNfortunately the MSI Installer is not available anymore ... All other packages and psutil can be installed as usual via pip or setup.py yours sincerely Robert
I committed ffe8a9d280c397e8fd46eb1422c2838179cfb5d9 so now you should be able to at least run tests.
hold on ... I recompile / reinstall and give it a try ...
unfortunately I can not pipe the results into a file ... it hangs at the last test :
psutil.tests.test_process.TestProcess.test_num_ctx_switches ...
psutil.tests.test_posix.TestProcess.test_cmdline ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_create_time ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_exe ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_gid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_ad_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_nsp_exc ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_create_time ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_exe ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_gid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_ad_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_nsp_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_nice ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_exe ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_gid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_ad_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_nsp_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_nice ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_num_fds ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_gid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_ad_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_nsp_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_nice ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_num_fds ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_ppid ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_name ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_ad_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_nsp_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_nice ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_num_fds ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_ppid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_rss_memory ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_name_long ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_ad_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_nsp_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_nice ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_num_fds ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_ppid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_rss_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_uid ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_name_long_cmdline_ad_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_name_long_cmdline_nsp_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_nice ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_num_fds ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_ppid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_rss_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_uid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_name_long_cmdline_nsp_exc ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_nice ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_num_fds ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_ppid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_rss_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_uid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username_no_resolution ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_nice ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_num_fds ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_ppid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_rss_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_uid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username_no_resolution ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_vsz_memory ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_num_fds ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_ppid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_rss_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_uid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username_no_resolution ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_vsz_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_disk_usage ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_ppid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_rss_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_uid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username_no_resolution ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_vsz_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_disk_usage ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_nic_names ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_rss_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_uid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username_no_resolution ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_vsz_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_disk_usage ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_nic_names ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_bad_ret_status ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_uid ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username_no_resolution ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_vsz_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_disk_usage ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_nic_names ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_bad_ret_status ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_eintr ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_username ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_username_no_resolution ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_vsz_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_disk_usage ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_nic_names ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_bad_ret_status ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_eintr ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_let_raise ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_username_no_resolution ... skipped 'POSIX only' psutil.tests.test_posix.TestProcess.test_vsz_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_disk_usage ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_nic_names ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_bad_ret_status ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_eintr ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pid_exists_let_raise ... skipped 'POSIX only'
psutil.tests.test_posix.TestProcess.test_vsz_memory ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_disk_usage ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_nic_names ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_bad_ret_status ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_eintr ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pid_exists_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pids ... skipped 'POSIX only'
psutil.tests.test_posix.TestSystemAPIs.test_disk_usage ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_nic_names ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_bad_ret_status ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_eintr ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pid_exists_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pids ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_users ... skipped 'POSIX only'
psutil.tests.test_posix.TestSystemAPIs.test_nic_names ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_bad_ret_status ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_eintr ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pid_exists_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pids ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_users ... skipped 'POSIX only' psutil.tests.test_process.TestPopen.test_ctx_manager ... ok
psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_bad_ret_status ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_eintr ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pid_exists_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pids ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_users ... skipped 'POSIX only' psutil.tests.test_process.TestPopen.test_ctx_manager ... ok psutil.tests.test_process.TestPopen.test_kill_terminate ... ok
psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_eintr ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pid_exists_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pids ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_users ... skipped 'POSIX only' psutil.tests.test_process.TestPopen.test_ctx_manager ... ok psutil.tests.test_process.TestPopen.test_kill_terminate ... ok psutil.tests.test_process.TestPopen.test_misc ... ok
psutil.tests.test_posix.TestSystemAPIs.test_os_waitpid_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pid_exists_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pids ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_users ... skipped 'POSIX only' psutil.tests.test_process.TestPopen.test_ctx_manager ... ok psutil.tests.test_process.TestPopen.test_kill_terminate ... ok psutil.tests.test_process.TestPopen.test_misc ... ok psutil.tests.test_process.TestProcess.test_as_dict ... ERROR
psutil.tests.test_posix.TestSystemAPIs.test_pid_exists_let_raise ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_pids ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_users ... skipped 'POSIX only' psutil.tests.test_process.TestPopen.test_ctx_manager ... ok psutil.tests.test_process.TestPopen.test_kill_terminate ... ok psutil.tests.test_process.TestPopen.test_misc ... ok psutil.tests.test_process.TestProcess.test_as_dict ... ERROR psutil.tests.test_process.TestProcess.test_children ... ok
psutil.tests.test_posix.TestSystemAPIs.test_pids ... skipped 'POSIX only' psutil.tests.test_posix.TestSystemAPIs.test_users ... skipped 'POSIX only' psutil.tests.test_process.TestPopen.test_ctx_manager ... ok psutil.tests.test_process.TestPopen.test_kill_terminate ... ok psutil.tests.test_process.TestPopen.test_misc ... ok psutil.tests.test_process.TestProcess.test_as_dict ... ERROR psutil.tests.test_process.TestProcess.test_children ... ok psutil.tests.test_process.TestProcess.test_children_duplicates ... ok
psutil.tests.test_posix.TestSystemAPIs.test_users ... skipped 'POSIX only' psutil.tests.test_process.TestPopen.test_ctx_manager ... ok psutil.tests.test_process.TestPopen.test_kill_terminate ... ok psutil.tests.test_process.TestPopen.test_misc ... ok psutil.tests.test_process.TestProcess.test_as_dict ... ERROR psutil.tests.test_process.TestProcess.test_children ... ok psutil.tests.test_process.TestProcess.test_children_duplicates ... ok psutil.tests.test_process.TestProcess.test_children_recursive ... ok
psutil.tests.test_process.TestPopen.test_ctx_manager ... ok psutil.tests.test_process.TestPopen.test_kill_terminate ... ok psutil.tests.test_process.TestPopen.test_misc ... ok psutil.tests.test_process.TestProcess.test_as_dict ... ERROR psutil.tests.test_process.TestProcess.test_children ... ok psutil.tests.test_process.TestProcess.test_children_duplicates ... ok psutil.tests.test_process.TestProcess.test_children_recursive ... ok psutil.tests.test_process.TestProcess.test_cmdline ... ERROR
psutil.tests.test_process.TestPopen.test_kill_terminate ... ok psutil.tests.test_process.TestPopen.test_misc ... ok psutil.tests.test_process.TestProcess.test_as_dict ... ERROR psutil.tests.test_process.TestProcess.test_children ... ok psutil.tests.test_process.TestProcess.test_children_duplicates ... ok psutil.tests.test_process.TestProcess.test_children_recursive ... ok psutil.tests.test_process.TestProcess.test_cmdline ... ERROR psutil.tests.test_process.TestProcess.test_cpu_affinity ... ok
psutil.tests.test_process.TestPopen.test_misc ... ok psutil.tests.test_process.TestProcess.test_as_dict ... ERROR psutil.tests.test_process.TestProcess.test_children ... ok psutil.tests.test_process.TestProcess.test_children_duplicates ... ok psutil.tests.test_process.TestProcess.test_children_recursive ... ok psutil.tests.test_process.TestProcess.test_cmdline ... ERROR psutil.tests.test_process.TestProcess.test_cpu_affinity ... ok psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations ... FAIL
psutil.tests.test_process.TestProcess.test_as_dict ... ERROR psutil.tests.test_process.TestProcess.test_children ... ok psutil.tests.test_process.TestProcess.test_children_duplicates ... ok psutil.tests.test_process.TestProcess.test_children_recursive ... ok psutil.tests.test_process.TestProcess.test_cmdline ... ERROR psutil.tests.test_process.TestProcess.test_cpu_affinity ... ok psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations ... FAIL psutil.tests.test_process.TestProcess.test_cpu_affinity_errs ... ok
psutil.tests.test_process.TestProcess.test_children ... ok psutil.tests.test_process.TestProcess.test_children_duplicates ... ok psutil.tests.test_process.TestProcess.test_children_recursive ... ok psutil.tests.test_process.TestProcess.test_cmdline ... ERROR psutil.tests.test_process.TestProcess.test_cpu_affinity ... ok psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations ... FAIL psutil.tests.test_process.TestProcess.test_cpu_affinity_errs ... ok psutil.tests.test_process.TestProcess.test_cpu_num ... skipped 'not supported'
psutil.tests.test_process.TestProcess.test_children_duplicates ... ok psutil.tests.test_process.TestProcess.test_children_recursive ... ok psutil.tests.test_process.TestProcess.test_cmdline ... ERROR psutil.tests.test_process.TestProcess.test_cpu_affinity ... ok psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations ... FAIL psutil.tests.test_process.TestProcess.test_cpu_affinity_errs ... ok psutil.tests.test_process.TestProcess.test_cpu_num ... skipped 'not supported' psutil.tests.test_process.TestProcess.test_cpu_percent ... ok
psutil.tests.test_process.TestProcess.test_children_recursive ... ok psutil.tests.test_process.TestProcess.test_cmdline ... ERROR psutil.tests.test_process.TestProcess.test_cpu_affinity ... ok psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations ... FAIL psutil.tests.test_process.TestProcess.test_cpu_affinity_errs ... ok psutil.tests.test_process.TestProcess.test_cpu_num ... skipped 'not supported' psutil.tests.test_process.TestProcess.test_cpu_percent ... ok psutil.tests.test_process.TestProcess.test_cpu_percent_numcpus_none ... ok
psutil.tests.test_process.TestProcess.test_cmdline ... ERROR psutil.tests.test_process.TestProcess.test_cpu_affinity ... ok psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations ... FAIL psutil.tests.test_process.TestProcess.test_cpu_affinity_errs ... ok psutil.tests.test_process.TestProcess.test_cpu_num ... skipped 'not supported' psutil.tests.test_process.TestProcess.test_cpu_percent ... ok psutil.tests.test_process.TestProcess.test_cpu_percent_numcpus_none ... ok psutil.tests.test_process.TestProcess.test_cpu_times ... ok
psutil.tests.test_process.TestProcess.test_cpu_affinity ... ok psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations ... FAIL psutil.tests.test_process.TestProcess.test_cpu_affinity_errs ... ok psutil.tests.test_process.TestProcess.test_cpu_num ... skipped 'not supported' psutil.tests.test_process.TestProcess.test_cpu_percent ... ok psutil.tests.test_process.TestProcess.test_cpu_percent_numcpus_none ... ok psutil.tests.test_process.TestProcess.test_cpu_times ... ok psutil.tests.test_process.TestProcess.test_cpu_times_2 ... ok
psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations ... FAIL psutil.tests.test_process.TestProcess.test_cpu_affinity_errs ... ok psutil.tests.test_process.TestProcess.test_cpu_num ... skipped 'not supported' psutil.tests.test_process.TestProcess.test_cpu_percent ... ok psutil.tests.test_process.TestProcess.test_cpu_percent_numcpus_none ... ok psutil.tests.test_process.TestProcess.test_cpu_times ... ok psutil.tests.test_process.TestProcess.test_cpu_times_2 ... ok psutil.tests.test_process.TestProcess.test_create_time ... ok
psutil.tests.test_process.TestProcess.test_cpu_affinity_errs ... ok psutil.tests.test_process.TestProcess.test_cpu_num ... skipped 'not supported' psutil.tests.test_process.TestProcess.test_cpu_percent ... ok psutil.tests.test_process.TestProcess.test_cpu_percent_numcpus_none ... ok psutil.tests.test_process.TestProcess.test_cpu_times ... ok psutil.tests.test_process.TestProcess.test_cpu_times_2 ... ok psutil.tests.test_process.TestProcess.test_create_time ... ok psutil.tests.test_process.TestProcess.test_cwd ... ERROR
psutil.tests.test_process.TestProcess.test_cpu_num ... skipped 'not supported' psutil.tests.test_process.TestProcess.test_cpu_percent ... ok psutil.tests.test_process.TestProcess.test_cpu_percent_numcpus_none ... ok psutil.tests.test_process.TestProcess.test_cpu_times ... ok psutil.tests.test_process.TestProcess.test_cpu_times_2 ... ok psutil.tests.test_process.TestProcess.test_create_time ... ok psutil.tests.test_process.TestProcess.test_cwd ... ERROR psutil.tests.test_process.TestProcess.test_cwd_2 ... ERROR
psutil.tests.test_process.TestProcess.test_cpu_percent ... ok psutil.tests.test_process.TestProcess.test_cpu_percent_numcpus_none ... ok psutil.tests.test_process.TestProcess.test_cpu_times ... ok psutil.tests.test_process.TestProcess.test_cpu_times_2 ... ok psutil.tests.test_process.TestProcess.test_create_time ... ok psutil.tests.test_process.TestProcess.test_cwd ... ERROR psutil.tests.test_process.TestProcess.test_cwd_2 ... ERROR psutil.tests.test_process.TestProcess.test_environ ... ERROR
psutil.tests.test_process.TestProcess.test_cpu_percent_numcpus_none ... ok psutil.tests.test_process.TestProcess.test_cpu_times ... ok psutil.tests.test_process.TestProcess.test_cpu_times_2 ... ok psutil.tests.test_process.TestProcess.test_create_time ... ok psutil.tests.test_process.TestProcess.test_cwd ... ERROR psutil.tests.test_process.TestProcess.test_cwd_2 ... ERROR psutil.tests.test_process.TestProcess.test_environ ... ERROR psutil.tests.test_process.TestProcess.test_exe ... ok
psutil.tests.test_process.TestProcess.test_cpu_times ... ok psutil.tests.test_process.TestProcess.test_cpu_times_2 ... ok psutil.tests.test_process.TestProcess.test_create_time ... ok psutil.tests.test_process.TestProcess.test_cwd ... ERROR psutil.tests.test_process.TestProcess.test_cwd_2 ... ERROR psutil.tests.test_process.TestProcess.test_environ ... ERROR psutil.tests.test_process.TestProcess.test_exe ... ok psutil.tests.test_process.TestProcess.test_gids ... skipped 'POSIX only'
psutil.tests.test_process.TestProcess.test_cpu_times_2 ... ok psutil.tests.test_process.TestProcess.test_create_time ... ok psutil.tests.test_process.TestProcess.test_cwd ... ERROR psutil.tests.test_process.TestProcess.test_cwd_2 ... ERROR psutil.tests.test_process.TestProcess.test_environ ... ERROR psutil.tests.test_process.TestProcess.test_exe ... ok psutil.tests.test_process.TestProcess.test_gids ... skipped 'POSIX only' psutil.tests.test_process.TestProcess.test_halfway_terminated_process ... ok
psutil.tests.test_process.TestProcess.test_create_time ... ok psutil.tests.test_process.TestProcess.test_cwd ... ERROR psutil.tests.test_process.TestProcess.test_cwd_2 ... ERROR psutil.tests.test_process.TestProcess.test_environ ... ERROR psutil.tests.test_process.TestProcess.test_exe ... ok psutil.tests.test_process.TestProcess.test_gids ... skipped 'POSIX only' psutil.tests.test_process.TestProcess.test_halfway_terminated_process ... ok psutil.tests.test_process.TestProcess.test_invalid_pid ... ok
psutil.tests.test_process.TestProcess.test_cwd ... ERROR psutil.tests.test_process.TestProcess.test_cwd_2 ... ERROR psutil.tests.test_process.TestProcess.test_environ ... ERROR psutil.tests.test_process.TestProcess.test_exe ... ok psutil.tests.test_process.TestProcess.test_gids ... skipped 'POSIX only' psutil.tests.test_process.TestProcess.test_halfway_terminated_process ... ok psutil.tests.test_process.TestProcess.test_invalid_pid ... ok psutil.tests.test_process.TestProcess.test_io_counters ... FAIL
psutil.tests.test_process.TestProcess.test_cwd_2 ... ERROR psutil.tests.test_process.TestProcess.test_environ ... ERROR psutil.tests.test_process.TestProcess.test_exe ... ok psutil.tests.test_process.TestProcess.test_gids ... skipped 'POSIX only' psutil.tests.test_process.TestProcess.test_halfway_terminated_process ... ok psutil.tests.test_process.TestProcess.test_invalid_pid ... ok psutil.tests.test_process.TestProcess.test_io_counters ... FAIL psutil.tests.test_process.TestProcess.test_ionice ... ERROR
psutil.tests.test_process.TestProcess.test_environ ... ERROR psutil.tests.test_process.TestProcess.test_exe ... ok psutil.tests.test_process.TestProcess.test_gids ... skipped 'POSIX only' psutil.tests.test_process.TestProcess.test_halfway_terminated_process ... ok psutil.tests.test_process.TestProcess.test_invalid_pid ... ok psutil.tests.test_process.TestProcess.test_io_counters ... FAIL psutil.tests.test_process.TestProcess.test_ionice ... ERROR psutil.tests.test_process.TestProcess.test_ionice_errs ... ok
psutil.tests.test_process.TestProcess.test_exe ... ok psutil.tests.test_process.TestProcess.test_gids ... skipped 'POSIX only' psutil.tests.test_process.TestProcess.test_halfway_terminated_process ... ok psutil.tests.test_process.TestProcess.test_invalid_pid ... ok psutil.tests.test_process.TestProcess.test_io_counters ... FAIL psutil.tests.test_process.TestProcess.test_ionice ... ERROR psutil.tests.test_process.TestProcess.test_ionice_errs ... ok psutil.tests.test_process.TestProcess.test_is_running ... ok
psutil.tests.test_process.TestProcess.test_gids ... skipped 'POSIX only' psutil.tests.test_process.TestProcess.test_halfway_terminated_process ... ok psutil.tests.test_process.TestProcess.test_invalid_pid ... ok psutil.tests.test_process.TestProcess.test_io_counters ... FAIL psutil.tests.test_process.TestProcess.test_ionice ... ERROR psutil.tests.test_process.TestProcess.test_ionice_errs ... ok psutil.tests.test_process.TestProcess.test_is_running ... ok psutil.tests.test_process.TestProcess.test_kill ... ok
psutil.tests.test_process.TestProcess.test_halfway_terminated_process ... ok psutil.tests.test_process.TestProcess.test_invalid_pid ... ok psutil.tests.test_process.TestProcess.test_io_counters ... FAIL psutil.tests.test_process.TestProcess.test_ionice ... ERROR psutil.tests.test_process.TestProcess.test_ionice_errs ... ok psutil.tests.test_process.TestProcess.test_is_running ... ok psutil.tests.test_process.TestProcess.test_kill ... ok psutil.tests.test_process.TestProcess.test_memory_full_info ... ERROR
psutil.tests.test_process.TestProcess.test_invalid_pid ... ok psutil.tests.test_process.TestProcess.test_io_counters ... FAIL psutil.tests.test_process.TestProcess.test_ionice ... ERROR psutil.tests.test_process.TestProcess.test_ionice_errs ... ok psutil.tests.test_process.TestProcess.test_is_running ... ok psutil.tests.test_process.TestProcess.test_kill ... ok psutil.tests.test_process.TestProcess.test_memory_full_info ... ERROR psutil.tests.test_process.TestProcess.test_memory_info ... ok
psutil.tests.test_process.TestProcess.test_io_counters ... FAIL psutil.tests.test_process.TestProcess.test_ionice ... ERROR psutil.tests.test_process.TestProcess.test_ionice_errs ... ok psutil.tests.test_process.TestProcess.test_is_running ... ok psutil.tests.test_process.TestProcess.test_kill ... ok psutil.tests.test_process.TestProcess.test_memory_full_info ... ERROR psutil.tests.test_process.TestProcess.test_memory_info ... ok psutil.tests.test_process.TestProcess.test_memory_maps ... ok
psutil.tests.test_process.TestProcess.test_ionice ... ERROR psutil.tests.test_process.TestProcess.test_ionice_errs ... ok psutil.tests.test_process.TestProcess.test_is_running ... ok psutil.tests.test_process.TestProcess.test_kill ... ok psutil.tests.test_process.TestProcess.test_memory_full_info ... ERROR psutil.tests.test_process.TestProcess.test_memory_info ... ok psutil.tests.test_process.TestProcess.test_memory_maps ... ok psutil.tests.test_process.TestProcess.test_memory_maps_lists_lib ... ERROR
psutil.tests.test_process.TestProcess.test_ionice_errs ... ok psutil.tests.test_process.TestProcess.test_is_running ... ok psutil.tests.test_process.TestProcess.test_kill ... ok psutil.tests.test_process.TestProcess.test_memory_full_info ... ERROR psutil.tests.test_process.TestProcess.test_memory_info ... ok psutil.tests.test_process.TestProcess.test_memory_maps ... ok psutil.tests.test_process.TestProcess.test_memory_maps_lists_lib ... ERROR psutil.tests.test_process.TestProcess.test_memory_percent ... ERROR
psutil.tests.test_process.TestProcess.test_is_running ... ok psutil.tests.test_process.TestProcess.test_kill ... ok psutil.tests.test_process.TestProcess.test_memory_full_info ... ERROR psutil.tests.test_process.TestProcess.test_memory_info ... ok psutil.tests.test_process.TestProcess.test_memory_maps ... ok psutil.tests.test_process.TestProcess.test_memory_maps_lists_lib ... ERROR psutil.tests.test_process.TestProcess.test_memory_percent ... ERROR psutil.tests.test_process.TestProcess.test_name ... ok
psutil.tests.test_process.TestProcess.test_kill ... ok psutil.tests.test_process.TestProcess.test_memory_full_info ... ERROR psutil.tests.test_process.TestProcess.test_memory_info ... ok psutil.tests.test_process.TestProcess.test_memory_maps ... ok psutil.tests.test_process.TestProcess.test_memory_maps_lists_lib ... ERROR psutil.tests.test_process.TestProcess.test_memory_percent ... ERROR psutil.tests.test_process.TestProcess.test_name ... ok psutil.tests.test_process.TestProcess.test_nice ... ok
psutil.tests.test_process.TestProcess.test_memory_full_info ... ERROR psutil.tests.test_process.TestProcess.test_memory_info ... ok psutil.tests.test_process.TestProcess.test_memory_maps ... ok psutil.tests.test_process.TestProcess.test_memory_maps_lists_lib ... ERROR psutil.tests.test_process.TestProcess.test_memory_percent ... ERROR psutil.tests.test_process.TestProcess.test_name ... ok psutil.tests.test_process.TestProcess.test_nice ... ok psutil.tests.test_process.TestProcess.test_num_ctx_switches ...
psutil.tests.test_process.TestProcess.test_memory_info ... ok psutil.tests.test_process.TestProcess.test_memory_maps ... ok psutil.tests.test_process.TestProcess.test_memory_maps_lists_lib ... ERROR psutil.tests.test_process.TestProcess.test_memory_percent ... ERROR psutil.tests.test_process.TestProcess.test_name ... ok psutil.tests.test_process.TestProcess.test_nice ... ok psutil.tests.test_process.TestProcess.test_num_ctx_switches ...
wineconsole: 0079:fixme:virtual:NtQueryVirtualMemory (process=0x178,addr=(nil)) Unimplemented information class: MemoryWorkingSetList
BTW - I am using wine 4.3 development - there might be different test results with wine-stable (conservative) or wine-staging (bleeding edge)
I use wine 32 Bit - and the recent python windows installer does not work. So I installed python on a windows 10 machine and just copied the installed python3 directory to wine - and it works perfectly! UNfortunately the MSI Installer is not available anymore ... All other packages and psutil can be installed as usual via pip or setup.py
Mmm I installed wine on Ubuntu, then tried to install python3.7 win installer and indeed failed. I tried to copy C:\pyhon37\ installation from a Windows installation into Linux and executed wine /home/giampaolo/Desktop/Python37/python.exe but also failred. Not sure how to install win on Windows (looks like it's UNIX only: https://wiki.winehq.org/Download).
giampaolo, do You have some messenger - I give You a crash course. just prepare a 64-Bit Linux Virtual Machine with Crome Remote Desktop
Are You still interested in installing WINE ? Its really cool, just give it a try. I have some production applications running on wine with great success - and in most cases it is much faster and stable then on Windows - as long as Your Software does not need any API Calls which are not included in WINE´s nt.dll If You want, I can help You, its not very hard.
@bitranox I'm already on Linux. And I also have a Windows 10 in VirtualBox. I basically need some instructions on how to install Wine, but I prefer to use this ticket (as opposed to remote remote desktop).
I just released psutil 5.6.1 which includes a fix for this issue which should target systems not supporting IPv6 (if any). I'm gonna close this issue as fixed and will treat Wine support in a separate one. @bitranox feel free to continue the discussion here for now though.
ok, here a very quick "howto"
- install wine : there are three versions : wine-stable, wine-develop, wine-staging python 3 does not work on wine-stable (last test 2017) , so I work with wine-develop you might also try wine-staging if You want.
so lets install wine-develop - You can Install 32 Bit and 64 Bit Windows machines in parallel (generally, as many windows machines as You like)
### enable 32 bit architecture (if you haven't already):
sudo dpkg --add-architecture i386
### Install Wine development
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
# put cosmic, bionic in the next line whatever You use ...
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ cosmic main'
sudo apt-get update
sudo apt-get install --install-recommends winehq-devel
At this stage we installed Wine - but no Machines until now. Wine uses a virtual C: drive instead of your real C: drive. The directory in which this is located is called a 'wineprefix.' By default, it's in your home directory: /home/giampaolo/.wine/drive_c
If You dont need that machine anymore, just simply delete that directory. Or copy it, to have a second, indipendent machine (as You might do it with vm-containers)
If You only install one Windows machine thats fine - but You might to use many for development, so we setup two machines for now. I usually install them not in the home directory, but in a directory below home to make it easier to reset permissions and ownerships of files after some dirty copy operations, etc. :
### NOT AS SUDO. NEVER RUN WINE AS ROOT ! NEVER !
### If You catch a Virus on WINE it might have unwanted access rights otherwise !
### WINE is NOT an Emulator. It is also NOT a virtual machine. It is "just" a compatibility layer
### to the linux kernel and functions (and therefore amazingly fast in most cases)
### that means WINE Processes are running in Your userspace !!!! - so better not run as root !
### Setup one 32 Bit Windows, named "wine_32_clean"
WINEARCH=win32 WINEPREFIX=/home/giampaolo/wine/wine_32_clean winecfg
### Setup one 64 Bit Windows, named "wine_64_clean"
WINEPREFIX=/home/giampaolo/wine/wine_64_clean winecfg
ok, we set up two machines now. I use one small script to clean up permissions and file ownership on the wine machines, because I might mess up rights when I copy from one machine to another as root, or something :
#!/bin/bash
sudo chown -R giampaolo /home/giampaolo/wine
sudo chgrp -R giampaolo /home/giampaolo/wine
sodo chmod -R 777 /home/giampaolo/wine
lets also create a new volume for all the wine machines :
mkdir /home/giampaolo/wine/shared_drive_d
ok - now lets start our first program on wine - but on which wine-prefix (context / machine / whatever You want to call it) for the following examples I use the program "wineconsole" what just gives You a windows command prompt. You might use the WINEPREFIX environment variable, or You put the WINEPREFIX before each command :
### open wineconsole for /wine/wine_32_clean
export WINEPREFIX=~/wine/wine_32_clean
wineconsole
### open wineconsole for /wine/wine_64_clean
export WINEPREFIX=~/wine/wine_64_clean
wineconsole
or
### open wineconsole for /wine/wine_32_clean
WINEPREFIX=~/wine/wine_32_clean wineconsole
### open wineconsole for /wine/wine_64_clean
WINEPREFIX=~/wine/wine_64_clean wineconsole
ok - so lets configure the machines a bit with winecfg - its pretty self-explaning, You can connect the directory /home/giampaolo/wine/shared_drive_d as drive d:, and even map Network Drives from /media/.... or any other directory, just by putting a link to ~/wine/wine_32_clean/dosdevices/unc/.... # <-- put a link to another directory here, to map it as network drive in wine
You can Set which Version of Windows it should report to programs, etc. ( I use usually WINDOWS10)
### configure the 32 Bit machine
WINEPREFIX=~/wine/wine_32_clean winecfg
### configure the 64 Bit machine
WINEPREFIX=~/wine/wine_64_clean winecfg
once You are fine with Your configuration, just copy the whole wine directory to have a backup, or just copy one of the wine directories to have a new, clean windows machine. Its as easy as that !
there are countless settings on wine You can set, You might use original Windows DLL if the wine dll does not work, and so on. Many of that configurations can set conveniently through "winetricks" - another program You might install. Just Install it and look around - but keep a copy of Your "clean" install !!! "winetricks" also helps on installing some major programs or packages what would be horrible if You do it manually.
ok, but You want to Install Python : the python installer does not work on wine (as of 2018), so just copy the python installation from Your Windows Machine. Of course, You need a 32 Bit Python Installation for the 32-Bit Windows Machine. On the 64-Bit Windows Machine both python Interpreters (32-Bit and 64 Bit) might work - i did not test that, I just use the 64 Bit Interpreter on the 64 Bit Wine
so just copy the installations (I used some Installations of a Windows10 machine):
### 32 Bit Python Installation
c:\python37_32Bit --> /home/giampaolo/wine/wine_32_clean/drive_c/python37
### 64 Bit Python Installation
c:\python37_64Bit --> /home/giampaolo/wine/wine_64_clean/drive_c/python37
now You should clean the permissions and ownerships with the small script mentioned above.
so lets test python on wine now :
WINEPREFIX=~/wine/wine_32_clean wineconsole
c:
cd /python37
python
and
WINEPREFIX=~/wine/wine_64_clean wineconsole
c:
cd /python37
python
voila !
everything else You can do in the wineconsole, like pip install and so on ...
I hope that was helpful, in case of any questions, let me know !
Robert
just curiouse - did it work as expected ? any more help needed ?