使用 py2exe 打包 Python 程序
Python的py文件生成pyd文件
源代码: git@gitee.com:menglingzhi/cython_test.git
另外python打包whl文件 : python setup.py sdist bdist_wheel python打包的参数说明:python setup.py --help-commands
python3.9和python3.10打包之后安装都不正确,最后使用python3.6打包、安装、测试通过 python3.6的环境:
D:\src\vscode\open3d_01>python3.6 setup.py bdist bdist_wininst
D:\src\vscode\open3d_01\dist>dir
2022/04/28 18:57 1,002,014 wanyee3d-0.0.1.win-amd64-py3.6.exe
2022/04/28 18:56 0 wanyee3d-0.0.1.win-amd64-py3.9.exe
2022/04/28 18:57 412,169 wanyee3d-0.0.1.win-amd64.zip
D:\src\vscode\open3d_01\dist>wanyee3d-0.0.1.win-amd64-py3.6.exe
D:\src\vscode\open3d_01\dist>python3.6 -m pip list
Package Version
-------------- --------
cachetools 4.2.4
cmake-example 0.0.1
Cython 0.29.28
filelock 3.4.1
future 0.18.2
nose 1.3.7
numpy 1.19.5
pefile 2021.9.3
pip 21.3.1
py2exe 0.11.0.1
python-example 0.0.1
setuptools 40.6.2
wanyee3d 0.0.1
D:\src\vscode\open3d_01\dist>python3.6
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import wanyee3d
>>> wanyee3d.add(1,2)
3
>>> exit()
|