Executable gives DLL load failed when run on another PC
Posted: Thu Nov 17, 2016 12:24 am
Hi
I am trying to use Enigma Virtual Box 7.70 to make a cut-down portable version of python2.7. I included a copy of all the necessary .pyc, .dll files as well as _socket.pyd, _ssl.pyd into the default directory and created an executable that runs on the host machine (Win7 64bit).
Copying the executable onto a Win 2003 server (x64) machine, the program starts up but fails on an import socket. Here are the outputs of python -vv on both machines:
HOST Win7:
>>> import socket
# trying socket.pyd
# trying socket.py
# socket.pyc matches socket.py
import socket # precompiled from socket.pyc
import gc # builtin
import time # builtin
# trying _socket.pyd
import _socket # dynamically loaded from _socket.pyd
# trying _ssl.pyd
import _ssl # dynamically loaded from _ssl.pyd
import cStringIO # builtin
>>>
REMOTE Win2003:
>>> import socket
# trying socket.pyd
# trying socket.py
# socket.pyc matches socket.py
import socket # precompiled from socket.pyc
import gc # builtin
import time # builtin
# trying _socket.pyd
# clear[1] _threshold2
# clear[1] _threshold0
# clear[1] _threshold1
# clear[2] __file__
# clear[2] gc
# clear[2] __name__
# clear[2] __doc__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "socket.py", line 51, in <module>
import _socket
ImportError: DLL load failed: Invalid access to memory location.
>>>
Does anyone know how to resolve this issue please?
Thanks
Colin Brown
I am trying to use Enigma Virtual Box 7.70 to make a cut-down portable version of python2.7. I included a copy of all the necessary .pyc, .dll files as well as _socket.pyd, _ssl.pyd into the default directory and created an executable that runs on the host machine (Win7 64bit).
Copying the executable onto a Win 2003 server (x64) machine, the program starts up but fails on an import socket. Here are the outputs of python -vv on both machines:
HOST Win7:
>>> import socket
# trying socket.pyd
# trying socket.py
# socket.pyc matches socket.py
import socket # precompiled from socket.pyc
import gc # builtin
import time # builtin
# trying _socket.pyd
import _socket # dynamically loaded from _socket.pyd
# trying _ssl.pyd
import _ssl # dynamically loaded from _ssl.pyd
import cStringIO # builtin
>>>
REMOTE Win2003:
>>> import socket
# trying socket.pyd
# trying socket.py
# socket.pyc matches socket.py
import socket # precompiled from socket.pyc
import gc # builtin
import time # builtin
# trying _socket.pyd
# clear[1] _threshold2
# clear[1] _threshold0
# clear[1] _threshold1
# clear[2] __file__
# clear[2] gc
# clear[2] __name__
# clear[2] __doc__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "socket.py", line 51, in <module>
import _socket
ImportError: DLL load failed: Invalid access to memory location.
>>>
Does anyone know how to resolve this issue please?
Thanks
Colin Brown