0

我正在尝试创建一个可执行文件(onefile\onedir 无关紧要)以pyinstaller在 GUI 中显示叶图。我设法成功地创建了exe. 它在我创建它的机器上完美运行,但是当我尝试在其他机器(相同的操作系统)上测试它时,它可以正确打开,但是在设置 HTML 时,视图会消失,留下一个空白区域。

规格文件:

import os
from osgeo import gdal, ogr, osr
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
from geopandas import GeoDataFrame
from PyInstaller.utils.hooks import collect_data_files
from PyInstaller.utils.hooks import collect_dynamic_libs
from ctypes.util import find_library

block_cipher = None


a = Analysis(['Main.py'],
         pathex=        
         ['...\\With_proxy_ALLWORKING\\TEST7_working2', 'C:\\ProgramData\\Anaconda3'],
         binaries=collect_dynamic_libs("rtree") + [('C:\ProgramData\Anaconda3\*.dll', '.')] + [("...\With_proxy_ALLWORKING\TEST7_working2\libiomp5md.dll", ".")],
         datas=[
         ("C:\\Users\\corra\\.conda\\envs\\oxenv2\\Lib\\site-packages\\branca\\*.json","branca"),
         ("C:\\Users\\corra\\.conda\\envs\\oxenv2\\Lib\\site-packages\\branca\\templates","templates"),
         ("C:\\Users\\corra\\.conda\\envs\\oxenv2\\Lib\\site-packages\\folium\\templates","templates"),
         ("C:\\Users\\corra\\.conda\\envs\\oxenv2\\Lib\\site-packages\\geopandas\\datasets\\naturalearth_cities\\*.*", "geopandas\\datasets\\naturalearth_cities"),
         ("C:\\Users\\corra\\.conda\\envs\\oxenv2\\Lib\\site-packages\\geopandas\\datasets\\naturalearth_lowres\\*.*", "geopandas\\datasets\\naturalearth_lowres"),
         ("...\\TEST7_working2\\logo.png", ".")
         ],
         hiddenimports=['fiona._shim', 
                       'fiona.schema',    
                       'ctypes',
                       'ctypes.util',
                       'fiona',
                       'gdal',
                       'geos',
                       'shapely',
                       'shapely.geometry',
                       'pyproj',
                       'rtree',
                       'geopandas.datasets',
                       'pytest',
                       'pandas._libs.tslibs.timedeltas'],
         hookspath=[],
         hooksconfig={},
         runtime_hooks=[],
         excludes=[],
         win_no_prefer_redirects=False,
         win_private_assemblies=False,
         cipher=block_cipher,
         noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
         cipher=block_cipher)

exe = EXE(pyz,
      a.scripts, 
      [],
      exclude_binaries=True,
      name='Main',
      debug=True,
      bootloader_ignore_signals=False,
      strip=False,
      upx=False,
      console=True,
      disable_windowed_traceback=False,
      target_arch=None,
      codesign_identity=None,
      entitlements_file=None )
coll = COLLECT(exe,
           a.binaries,
           a.zipfiles,
           a.datas, 
           strip=False,
           upx=False,
           upx_exclude=[],
           name='Main')
4

0 回答 0