当我需要将多个.py文件(不仅是)转换为一个.exe文件以便与朋友共享时,我遇到了这个问题。我试过使用py2exe,pyInstaller等。我最后一次尝试使用cx_Freeze,因为它是支持Python3.7的最新程序。但是现在我不能用pip安装它,我遇到了这个问题: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\
所以,我搜索了一下,我找到了用轮子解决这个问题的方法,但是它也不起作用: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.
可能是我做错了什么,或者将多个.py文件编译成一个.exe是一种更容易的方法?
发布于 2019-03-17 17:16:24
使用Pyinstaller或Py2exe。
pip install Pyinstall`或
pip install Py2exe它也在python3.7中工作。
然而,cx_Freeze在3.7中不起作用,尽管您可以在Python2x和可能3.4中使用cx_Freeze。
https://stackoverflow.com/questions/52093116
复制相似问题