Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #99007 > unrolled thread

pyinstaller and Python 3.5 on Windows?

Started byUlli Horlacher <framstag@rus.uni-stuttgart.de>
First post2015-11-18 22:46 +0000
Last post2015-11-19 13:32 +0000
Articles 7 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  pyinstaller and Python 3.5 on Windows? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-18 22:46 +0000
    Re: pyinstaller and Python 3.5 on Windows? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-11-19 01:13 +0100
    Re: pyinstaller and Python 3.5 on Windows? Christian Gollwitzer <auriocus@gmx.de> - 2015-11-19 08:04 +0100
      Re: pyinstaller and Python 3.5 on Windows? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-19 07:50 +0000
    Re: pyinstaller and Python 3.5 on Windows? Kevin Walzer <kw@codebykevin.com> - 2015-11-19 06:41 -0500
      Re: pyinstaller and Python 3.5 on Windows? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-19 12:25 +0000
        Re: pyinstaller and Python 3.5 on Windows? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2015-11-19 13:32 +0000

#99007 — pyinstaller and Python 3.5 on Windows?

FromUlli Horlacher <framstag@rus.uni-stuttgart.de>
Date2015-11-18 22:46 +0000
Subjectpyinstaller and Python 3.5 on Windows?
Message-ID<n2iv3p$o1n$2@news2.informatik.uni-stuttgart.de>
To run my Python programs on other Windows systems without a Python
installation I must create standalone Windows executables.

pyinstaller runs without any problems with Python 2.7.10 on Windows 7, but
with Python 3.5 I get:

S:\python>pyinstaller.exe --onefile tk.py
Traceback (most recent call last):
  File "C:\Python35\Scripts\pyinstaller-script.py", line 9, in <module>
    load_entry_point('PyInstaller==3.0', 'console_scripts', 'pyinstaller')()
  File "c:\python35\lib\site-packages\pkg_resources\__init__.py", line 558, in l
oad_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\python35\lib\site-packages\pkg_resources\__init__.py", line 2682, in
load_entry_point
    return ep.load()
  File "c:\python35\lib\site-packages\pkg_resources\__init__.py", line 2355, in
load
    return self.resolve()
  File "c:\python35\lib\site-packages\pkg_resources\__init__.py", line 2361, in
resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\python35\lib\site-packages\PyInstaller\__main__.py", line 21, in <mod
ule>
    import PyInstaller.building.build_main
  File "c:\python35\lib\site-packages\PyInstaller\building\build_main.py", line
31, in <module>
    from ..depend import bindepend
  File "c:\python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 40,
 in <module>
    from ..utils.win32.winmanifest import RT_MANIFEST
  File "c:\python35\lib\site-packages\PyInstaller\utils\win32\winmanifest.py", l
ine 97, in <module>
    from PyInstaller.utils.win32 import winresource
  File "c:\python35\lib\site-packages\PyInstaller\utils\win32\winresource.py", l
ine 20, in <module>
    import pywintypes
  File "c:\python35\lib\site-packages\win32\lib\pywintypes.py", line 124, in <mo
dule>
    __import_pywin32_system_module__("pywintypes", globals())
  File "c:\python35\lib\site-packages\win32\lib\pywintypes.py", line 64, in __im
port_pywin32_system_module__
    import _win32sysloader
ImportError: DLL load failed: The specified module could not be found.


Is there a solution available?



-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum IZUS/TIK         E-Mail: horlacher@tik.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-68565868
Allmandring 30a                Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/

[toc] | [next] | [standalone]


#99017

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-11-19 01:13 +0100
Message-ID<16273698.Ox6ucYQkhb@PointedEars.de>
In reply to#99007
Ulli Horlacher wrote:

> To run my Python programs on other Windows systems without a Python
> installation I must create standalone Windows executables.
> 
> pyinstaller runs without any problems with Python 2.7.10 on Windows 7, but
> with Python 3.5 I get:
> 
> [b0rked stack trace]
> 
> Is there a solution available?

Maybe.  It would help if you posted something easier readable.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#99032

FromChristian Gollwitzer <auriocus@gmx.de>
Date2015-11-19 08:04 +0100
Message-ID<n2js4r$1kq$1@dont-email.me>
In reply to#99007
Am 18.11.15 um 23:46 schrieb Ulli Horlacher:
> To run my Python programs on other Windows systems without a Python
> installation I must create standalone Windows executables.
>
> pyinstaller runs without any problems with Python 2.7.10 on Windows 7, but
> with Python 3.5 I get:
>  [stack trace]

Are you using the newest version? According to 
http://www.pyinstaller.org/ they claim support for Python3. Does a hello 
world script work? If yes, it may have to do with some packages in your 
script. Is pywin32 a package that you load, or is it Pyinstaller that 
needs this?

	Christian

[toc] | [prev] | [next] | [standalone]


#99035

FromUlli Horlacher <framstag@rus.uni-stuttgart.de>
Date2015-11-19 07:50 +0000
Message-ID<n2juvt$14p$1@news2.informatik.uni-stuttgart.de>
In reply to#99032
Christian Gollwitzer <auriocus@gmx.de> wrote:
> Am 18.11.15 um 23:46 schrieb Ulli Horlacher:
> > To run my Python programs on other Windows systems without a Python
> > installation I must create standalone Windows executables.
> >
> > pyinstaller runs without any problems with Python 2.7.10 on Windows 7, but
> > with Python 3.5 I get:
> >  [stack trace]
> 
> Are you using the newest version?

Yes. Yesterday installed.


> According to http://www.pyinstaller.org/ they claim support for Python3.

Therefore my try :-)


> Does a hello world script work?

No. 
My test-program I tried to compile was:

#!/usr/bin/python

from tkinter import Tk,filedialog

askopenfilename = filedialog.askopenfilename

Tk().withdraw()
file = filedialog.askopenfilename()
print('File selected: "%s"\n' % file)


It runs directly, but I cannot compile it with pyinstaller.


-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum IZUS/TIK         E-Mail: horlacher@tik.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-68565868
Allmandring 30a                Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/

[toc] | [prev] | [next] | [standalone]


#99046

FromKevin Walzer <kw@codebykevin.com>
Date2015-11-19 06:41 -0500
Message-ID<n2kcdk$l39$1@dont-email.me>
In reply to#99007
On 11/18/15 5:46 PM, Ulli Horlacher wrote:
>
> ImportError: DLL load failed: The specified module could not be found.
>
>
> Is there a solution available?
>

I understand that Python 3.5 has shipped how the MS dll's from Visual 
Studio are shipped, and perhaps the freezing tools (pyinstaller, py2exe) 
haven't yet caught up. Consider filing a bug with the pyinstaller 
developers.

--Kevin

-- 
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

[toc] | [prev] | [next] | [standalone]


#99054

FromUlli Horlacher <framstag@rus.uni-stuttgart.de>
Date2015-11-19 12:25 +0000
Message-ID<n2kf43$4u7$1@news2.informatik.uni-stuttgart.de>
In reply to#99046
Kevin Walzer <kw@codebykevin.com> wrote:

> I understand that Python 3.5 has shipped how the MS dll's from Visual 
> Studio are shipped, and perhaps the freezing tools (pyinstaller, py2exe) 
> haven't yet caught up. Consider filing a bug with the pyinstaller 
> developers.

http://pythonhosted.org/PyInstaller/#windows

  Installing in Windows

  For Windows, PyWin32 or the more recent pypiwin32, is a prerequisite.
  The latter is installed automatically when you install PyInstaller using
  pip or easy_install. If necessary, follow the pypiwin32 link to install
  it manually.

I have installed PyInstaller using "pip install pyinstaller".

Ok, then:

C:\Users\admin>pip install pywin32
Collecting pywin32
  Could not find a version that satisfies the requirement pywin32 (from versions: )
  Some externally hosted files were ignored as access to them may be unreliable
(use --allow-external pywin32 to allow).
No matching distribution found for pywin32


C:\Users\admin>pip install pypiwin32
Collecting pypiwin32
  Downloading pypiwin32-219-cp35-none-win32.whl (7.9MB)
    100% |################################| 7.9MB 61kB/s
Installing collected packages: pypiwin32
Exception:
Traceback (most recent call last):
  File "c:\program files (x86)\python 3.5\lib\site-packages\pip\basecommand.py",
 line 211, in main
    status = self.run(options, args)
  File "c:\program files (x86)\python 3.5\lib\site-packages\pip\commands\install
.py", line 311, in run
    root=options.root_path,
  File "c:\program files (x86)\python 3.5\lib\site-packages\pip\req\req_set.py",
 line 646, in install
    **kwargs
  File "c:\program files (x86)\python 3.5\lib\site-packages\pip\req\req_install.
py", line 803, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "c:\program files (x86)\python 3.5\lib\site-packages\pip\req\req_install.
py", line 998, in move_wheel_files
    isolated=self.isolated,
  File "c:\program files (x86)\python 3.5\lib\site-packages\pip\wheel.py", line
339, in move_wheel_files
    clobber(source, lib_dir, True)
  File "c:\program files (x86)\python 3.5\lib\site-packages\pip\wheel.py", line
317, in clobber
    shutil.copyfile(srcfile, destfile)
  File "c:\program files (x86)\python 3.5\lib\shutil.py", line 115, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'c:\\program files (x86)\\python
3.5\\Lib\\site-packages\\PyWin32.chm'


Why "Permission denied"? I am logged in as administrator! Stupid Windows...


Then https://pypi.python.org/pypi/pypiwin32/219 :

pypiwin32-219-cp35-none-win32.whl  Python Wheel    cp35     2015-01-09 7MB

"Python Wheel"?!

http://python-packaging-user-guide.readthedocs.org/en/latest/installing/#install-pip-setuptools-and-wheel

C:\Users\admin>pip install wheel
Collecting wheel
  Downloading wheel-0.26.0-py2.py3-none-any.whl (63kB)
    100% |################################| 65kB 1.3MB/s
Installing collected packages: wheel
  Failed to write executable - trying to use .deleteme logic
Exception:
Traceback (most recent call last):
  File "c:\program files (x86)\python 3.5\lib\site-packages\pip\_vendor\distlib\
scripts.py", line 209, in _write_script
    self._fileop.write_binary_file(outname, script_bytes)
  File "c:\program files (x86)\python 3.5\lib\site-packages\pip\_vendor\distlib\
util.py", line 388, in write_binary_file
    with open(path, 'wb') as f:
PermissionError: [Errno 13] Permission denied: 'c:\\program files (x86)\\python
3.5\\Scripts\\wheel.exe'


Looks like I have a broken Windows :-(

-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum IZUS/TIK         E-Mail: horlacher@tik.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-68565868
Allmandring 30a                Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/

[toc] | [prev] | [next] | [standalone]


#99057

FromUlli Horlacher <framstag@rus.uni-stuttgart.de>
Date2015-11-19 13:32 +0000
Message-ID<n2kj18$69s$1@news2.informatik.uni-stuttgart.de>
In reply to#99054
Ulli Horlacher <framstag@rus.uni-stuttgart.de> wrote:

> C:\Users\admin>pip install pypiwin32
> Collecting pypiwin32
>   Downloading pypiwin32-219-cp35-none-win32.whl (7.9MB)
>     100% |################################| 7.9MB 61kB/s
> Installing collected packages: pypiwin32
> Exception:
(...)
> PermissionError: [Errno 13] Permission denied: 'c:\\program files (x86)\\python
> 3.5\\Lib\\site-packages\\PyWin32.chm'
> 
> 
> Why "Permission denied"? I am logged in as administrator! Stupid Windows...

I found, I have to deactivate Windows UAC with 
C:\Windows\System32\UserAccountControlSettings.exe

Then I was able to run

pip install pypiwin32
pip install pyinstaller

without errors.

BUT pyinstaller does not work:

S:\python>pyinstaller.exe --onefile tk.py
failed to create process.

S:\python>pyinstaller --version
failed to create process.

-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum IZUS/TIK         E-Mail: horlacher@tik.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-68565868
Allmandring 30a                Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web