4

I ran into the problem when I need to convert multiple .py files (and not only) to one .exe file to share it with friends. I tried using py2exe, pyInstaller, ect. My last try was using cx_Freeze, since it the latest program that support Python3.7. But now I can't install it with pip, I ran into that problem: pip install cx_Freeze

Command "C:\Users\krawz\AppData\Local\Programs\Python\Python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\krawz\\AppData\\Local\\Temp\\pip-install-j4h9docf\\cx-Freeze\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\krawz\AppData\Local\Temp\pip-record-3_cvdrfd\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\krawz\AppData\Local\Temp\pip-install-j4h9docf\cx-Freeze\


So, I googled a bit and I found the way to solve it using wheel, but it also didn't work: install pip install cx_Freeze-5.1.1-cp37-cp37m-win_amd64.whl

cx_Freeze-5.1.1-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.

May be I'm doing something wrong or it is an easier way to compile multiple .py files into one .exe?

1 Answers1

1

Use Pyinstaller or Py2exe.

pip install Pyinstall`

or

pip install Py2exe

It also works in python 3.7.

However, cx_Freeze doesn't work in 3.7, though you can use cx_Freeze in Python 2x and maybe 3.4.

Panagiotis Kanavos
  • 120,703
  • 13
  • 188
  • 236
Md Das
  • 11
  • 3
  • Based on my own experience and this [stackoverflow answer](https://stackoverflow.com/a/42310168/4739755) to a related question, Py2exe _also_ does not work on 3.7. – b_c May 23 '19 at 19:24