Error loading Python DLL

1,531 views
Skip to first unread message

João Paulo de Souza

unread,
May 6, 2014, 7:52:30 PM5/6/14
to pyins...@googlegroups.com
when i try to run my exe i have this error 
Error loading Python DLL: C:\Users\JOOPAU~1\AppData\Local\Temp\_MEI49762\python27.dll (error code 1
26) someone can help?

Mahmoodreza Aarabi

unread,
May 7, 2014, 8:23:54 AM5/7/14
to pyins...@googlegroups.com
do you bundle python27.dll in exe file?
and if you run it in a clean system (system that does not have any program on it except windows) you should install vcredist that related to your python version



--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To post to this group, send email to pyins...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.



--


Bests,
madoodia

João Paulo de Souza

unread,
May 11, 2014, 3:47:15 PM5/11/14
to pyins...@googlegroups.com
Mahmoodreza Aarabi,
I'm not bundle python27.dll in exe. using windows 7(x64), same machine to dev and deploy, python 2.7 and Microsoft Visual C++ 2008 Redistributable Package (x86) 9.0.21022 
running "pyinstaller myspecfile.spec"

here my spec file 

# -*- mode: python -*-
a = Analysis(['main.py'],
             pathex=['E:\\Downloads\\eclipse\\git\\Python\\camelot'],
             hiddenimports=[],
             hookspath=None,
             runtime_hooks=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
          a.scripts,
          exclude_binaries=False,
          name='main.exe',
          debug=False,
          strip=None,
          upx=True,
          console=True )
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=None,
               upx=True,
               name='main')

Mahmoodreza Aarabi

unread,
May 11, 2014, 3:49:49 PM5/11/14
to pyins...@googlegroups.com
what error you get?

João Paulo de Souza

unread,
May 11, 2014, 3:52:54 PM5/11/14
to pyins...@googlegroups.com
Error loading Python DLL: C:\Users\JOOPAU~1\AppData\Local\Temp\_MEI49762\python27.dll (error code 1
26) when i run the exe

João Paulo de Souza

unread,
May 11, 2014, 3:55:22 PM5/11/14
to pyins...@googlegroups.com
and when i go to C:\Users\JOOPAU~1\AppData\Local\Temp\_MEI49762 there are no python27.dll in it.

Mahmoodreza Aarabi

unread,
May 11, 2014, 3:55:57 PM5/11/14
to pyins...@googlegroups.com
you should install vcredist_x86 2008
you can find it in microsoft website and download it as free

Hartmut Goebel

unread,
May 11, 2014, 4:02:36 PM5/11/14
to pyins...@googlegroups.com
Am 11.05.2014 21:55, schrieb João Paulo de Souza:
and when i go to C:\Users\JOOPAU~1\AppData\Local\Temp\_MEI49762 there are no python27.dll in it.

You have to transfer everything in the dist/ directory to the target system.

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: http://www.goebel-consult.de/blog/trustcenter.de-nimmt-es-mit-der-sicherheit-nicht-mehr-so-genau
Kolumne: http://www.cissp-gefluester.de/2011-11-in-troja-nichts-neues

Goebel Consult ist Mitglied bei http://www.7-it.de/

Mahmoodreza Aarabi

unread,
May 11, 2014, 4:06:03 PM5/11/14
to pyins...@googlegroups.com
no no
everything should be transfer automatically
no need to manually transfer
DLL error is becaused vcredist should be compatible with python msvcr90.dll
if you use python27 64 you should install vcredist_x64 2008
if python 32 you should use vcredist_x86 2008
--


Bests,
madoodia

João Paulo de Souza

unread,
May 11, 2014, 4:14:40 PM5/11/14
to pyins...@googlegroups.com
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32]

already have a buch vcredist intalled: 2005 2008 2010 2012 both x86 and x64 it's a mess up, could be this?

Mahmoodreza Aarabi

unread,
May 11, 2014, 4:14:46 PM5/11/14
to pyins...@googlegroups.com
if it does not work and does not attach python27.dll to dist create a tree and add it to collect or exe
but this is first step of errors
;)
--


Bests,
madoodia

Mahmoodreza Aarabi

unread,
May 11, 2014, 4:16:31 PM5/11/14
to pyins...@googlegroups.com
download this python-2.7.6.amd64.msi
is compatible with vcredist_x64 2008
--


Bests,
madoodia

João Paulo de Souza

unread,
May 13, 2014, 4:50:36 PM5/13/14
to pyins...@googlegroups.com
Mahmoodreza Aarabi, 
all freshed install all 32bit but same error

João Paulo de Souza

unread,
May 13, 2014, 4:51:07 PM5/13/14
to pyins...@googlegroups.com
reinstalled win7 32bit too
Reply all
Reply to author
Forward
0 new messages