How to change python version for use with pyinstaller

后端 未结 5 957
遥遥无期
遥遥无期 2021-02-06 00:25

I am trying to convert a .py file to an exe. My file, hello.py, reads:

print \"Hello, World!\"

I am currently trying to use pyinstaller. Howeve

5条回答
  •  旧巷少年郎
    2021-02-06 01:16

    When you need to bundle your application within one OS but for different versions of Python and support libraries – for example, a Python 3 version and a Python 2.7 version; or a supported version that uses Qt4 and a development version that uses Qt5 – we recommend you use virtualenv. With virtualenv you can maintain different combinations of Python and installed packages, and switch from one combination to another easily. (If you work only with Python 3.4 and later, python3 -m venv does the same job, see module venv.)

    • Use virtualenv to create as many different development environments as you need, each
    • with its unique combination of Python and installed packages.
    • Install PyInstaller in each environment.
    • Use PyInstaller to build your application in each environment.

提交回复
热议问题