我正在尝试在Windows 10上的Python(PyQT5)中构建项目的.exe安装程序。
在我的主文件夹('diplom_release')中,我有一些.py文件和几个其他文件夹: “设计” (。ui文件), “数据” (有几个带有.bmp,.png和.sav文件的文件夹), “测试” (空)。
当我在CMD中从文件夹运行到“ diplom_release”时:
pynsist installer.cfg
我知道了
ImportError: Cannot bundle namespace package 'diplom_release'
我正在尝试pyinstaller,但是不相关的库有太多问题,我决定选择另一种方法。
我有installer.cfg:
[Application]
name='Liver texture statistics analyzer'
version=0.1
# How to launch the app - this calls the 'main' function from the 'diplom_release' package:
entry_point=diplom_release:main
icon=ltsa.ico
[Python]
version=3.6.1
[Include]
# Packages from PyPI that your application requires, one per line
packages = diplom_release
# These must have wheels on PyPI:
pypi_wheels = requests==2.18.4
pyqt5==5.9.2
matplotlib==3.1.0
pandas==0.24.2
numpy==1.16.3
pillow==5.2.0
pynrrd==0.4.0
pyradiomics==2.1.2
seaborn==0.9.0
scikit-learn==0.21.1
# Other files and folders that should be installed
files = diplom_release\radiomics_single.py
diplom_release\data_reader.py
diplom_release\classification.py
diplom_release\mplwidget.py
diplom_release\data\result\model\Logistic Regression diagnosis_code.sav
diplom_release\data\result\model\Logistic Regression isauh.sav
diplom_release\data\result\model\Logistic Regression ishpc.sav
diplom_release\data\result\model\Logistic Regression ishpb.sav
diplom_release\data\result\model\Logistic Regression iswls.sav
diplom_release\data\result\model\Logistic Regression isnorm.sav