How to install pyinstaller in Python 3.4.3

0

2

I am trying to install pyinstaller in Python 3.4.3:

C:\Python34\Scripts>pip3 install pyinstaller

Collecting pyinstaller
  Using cached PyInstaller-3.3.1.tar.gz
Requirement already satisfied: setuptools in c:\python34\lib\site-packages (from pyinstaller)
Collecting pefile>=2017.8.1 (from pyinstaller)
  Using cached pefile-2017.11.5.tar.gz
Collecting macholib>=1.8 (from pyinstaller)
  Using cached macholib-1.9-py2.py3-none-any.whl
Collecting future (from pyinstaller)
  Using cached future-0.16.0.tar.gz
Collecting pypiwin32 (from pyinstaller)
  Using cached pypiwin32-223-py3-none-any.whl
Collecting altgraph>=0.15 (from macholib>=1.8->pyinstaller)
  Using cached altgraph-0.15-py2.py3-none-any.whl
Collecting pywin32>=223 (from pypiwin32->pyinstaller)
  Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32->pyinstaller) (from versions: )
No matching distribution found for pywin32>=223 (from pypiwin32->pyinstaller)

Then I try to install pypiwin32:

C:\Python34\Scripts>pip3 install pypiwin32

Collecting pypiwin32
  Using cached pypiwin32-223-py3-none-any.whl
Collecting pywin32>=223 (from pypiwin32)
  Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32) (from versions: )
No matching distribution found for pywin32>=223 (from pypiwin32)

Can I install this in Python3.4.3? I need this version because it is the last version that supports XP installation.

Hrvoje T

Posted 2018-03-03T18:05:37.800

Reputation: 1 809

Answers

1

I need this version because it is the last version that supports XP installation.

As a small aside, regarding binary distributions of Python 3.4.x, you may want to consider Python 3.4.4. I believe it should still be compatible with Windows XP and is obviously one version better. =)

Can I install [PyInstaller] in Python 3.4.3?

After some (very) light testing, it seems possible.

The issue you're encountering is that the current versions of pywin32 and pypiwin32 on PyPI don't appear to have versions that support Python 3.4.x.

For pywin32, the latest version (version 223) only provides wheels for Python 2.7, 3.5, 3.6 and 3.7 (currently in pre-release). pypiwin32, being a repackaged version of pywin32, currently requires pywin32 (>=223), which (as already mentioned) has no apparent options for 3.4.x at this time.

That said, it is possible to manually install older versions of either of these packages into 3.4.x, assuming you encounter no other issues.


Manually Installing pypiwin32/pywin32

Please note:

  • The options listed below are mutually exclusive — they both install a version of pywin32. Pick one.

  • Manually installing means that you have to download the right package yourself. Using pip may or may not still be involved. If it is, it's only used after you've downloaded the correct file first.

Option 1 - pypiwin32 (older)

pypiwin32 version 219 is still available on PyPI and has wheels for Python 3.4. The 64-bit wheel and PyInstaller 3.0 (also manually installed) worked for me without issue.

To install pypiwin32 version 219:

  • Download the correct wheel that matches your Python distribution (either pypiwin32-219-cp34-none-win32.whl or pypiwin32-219-cp34-none-win_amd64.whl) from the PyPI page linked above.

  • Open a command window and navigate to the location where you saved the wheel.

  • Assuming Python is registered at the command line, type something similar to the following:

    python -m pip install name-of-the-downloaded.whl
    

Option 2 - pywin32 (newer)

pywin32 maintains a GitHub repository independent of PyPI, which currently has releases for pywin32 version 221 on Python 3.4 (versions 222 and 223 still do not have compatible releases for 3.4).

PyInstaller 3.3.1 (currently the latest version obtainable through pip) seemed to work without issue with this version of pywin32.

To install pywin32 version 221:

  • Download the correct installer (.exe) that matches your Python distribution (either pywin32-221.win32-py3.4.exe or pywin32-221.win-amd64-py3.4.exe) from the Release page linked above.

  • Navigate to the location where you saved the installer.

  • Double-click the installer and follow the on-screen instructions. Make sure that the correct version and location information for your Python installation is identified in the second installation window:

pywin32 Installer


Testing Notes

  • Installation was done on Windows 7 (I don't have an XP VM available at the moment, sadly).

  • Testing was very light (no installation errors, PyInstaller correctly packaged a small test script).

  • PyInstaller has several iterations available on PyPI. I tried to match release dates somewhat closely between pypiwin32/pywin32 and PyInstaller versions for likely compatability, but I didn't test any combinations other than the ones listed above.


Anaksunaman

Posted 2018-03-03T18:05:37.800

Reputation: 9 278

I used option 1 and it worked. Thank you! – Hrvoje T – 2018-03-05T13:51:17.903

You're welcome. Glad you got it working. =) – Anaksunaman – 2018-03-05T13:52:46.510

Now I have another issue. Maybe you can help, when you have time ;) https://superuser.com/questions/1300820/cant-run-my-pyinstaller-made-exe-app-with-pyqt5-on-windows-10

– Hrvoje T – 2018-03-06T06:46:43.920

Can't promise answers, but I will take a look. =) – Anaksunaman – 2018-03-06T17:18:54.657