1

I am trying to create a geospatial Python GUI app using PyQT5, Geopandas, OSMnX, and Folium. I am converting the app into an .EXE file using pyinstaller. Previously, I was successfully able to create a .EXE file when not importing geopandas. But I am getting an error once I use Geopandas to build the executable as shown in the screenshot. enter image description here

This is how my spec file looks for building the executable.


block_cipher = None

hidden_imports = [
'fiona',
'gdal',
'shapely',
'shapely.geometry',
'pyproj',
'rtree',
'geopandas.datasets',
'pytest',
'pandas._libs.tslibs.timedeltas',
'fiona._shim',
]


a = Analysis(['main.py'],
             pathex=['D:\\CrowdSourcingV2'],
             binaries=[],
             datas=[
             ('input', 'input'), 
             ('input', 'input'),
             ("D:\\Anaconda\\envs\\ox\Lib\\site-packages\\branca\\*.json","branca"),
             ("D:\\Anaconda\\envs\\ox\\Lib\\site-packages\\branca\\templates","templates"),
             ("D:\\Anaconda\\envs\\ox\\Lib\\site-packages\\folium\\templates","templates")
             ],
             hiddenimports=hidden_imports,
             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,
          a.binaries,
          a.zipfiles,
          a.datas,  
          [],
          name='Crowdsourcing Tool',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          upx_exclude=[],
          runtime_tmpdir=None,
          console=True,
          disable_windowed_traceback=False,
          target_arch=None,
          codesign_identity=None,
          entitlements_file=None )

Could someone provide any hint or solution on how I can resolve this issue?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.