Issues using py2exe, psutil library errors

353 views Asked by At

I'm trying to use py2exe for making a python program exe.
Until now it was working perfectly, but in the new version of the program I'm using psutil library and it makes some problems to some people.
In my computer, it works perfectly, I can start the exe file without any issues.
But on other computers, the exe program makes a problems and it creates a error log, here is it:

Traceback (most recent call last):
File "guard.pyw", line 10, in <module>
File "psutil\__init__.pyc", line 126, in <module>
File "psutil\_pswindows.pyc", line 16, in <module>
File "psutil\_psutil_windows.pyc", line 12, in <module>
File "psutil\_psutil_windows.pyc", line 10, in __load
ImportError: DLL load failed: The operating system cannot run %1.

I have no idea why it happens, especially when it works fine in my computer.
Here is the setup.py file of the py2exe program, maybe the problem is there:

from distutils.core import setup
import py2exe, sys, os

sys.argv.append('py2exe')

setup (windows = ['guard.pyw'],
    options = { 'py2exe' : {'packages':['Tkinter'], 'compressed': True}},
    dll_excludes=['msvcr71.dll', "IPHLPAPI.DLL", "NSI.dll",  "WINNSI.DLL", "WTSAPI32.dll"])

Does anyone have an idea about how to fix that issue? Thanks in advance :)

0

There are 0 answers