yogiwinardhana
yogiwinardhana

Reputation: 33

Pyinstaller: 'Fiona' has no attribute '_loading' (most likely due to a circular import)

I really need help dealing with this issue.

I run my script on PyScripter and everything works perfectly, but when I try to bundle all the scripts into .exe using PyInstaller I got an error as shown in the picture below.
enter image description here

I also try to run from the Anaconda prompt in my virtual environment, there is no issue at all.

How can I fix this issue??

FYI, I also provide my conda information. enter image description here

and all the packages that I used. enter image description here

Plus, a snippet from my code (I don't know whether it's relevant or not) enter image description here

The figure below should be the output that I look for enter image description here

Thank you for your help, it's been many days and I still couldn't fix this issue.

Upvotes: 1

Views: 3074

Answers (2)

Arj184cm
Arj184cm

Reputation: 31

I'm not sure if this gonna solve your problem, but you can try my method. I directly change the code from fiona's __init__ file.

import fiona._loading 
with fiona._loading.add_gdal_dll_directories():

to

import _loading
with _loading.add_gdal_dll_directories():

Upvotes: 3

Jc LE BERRE
Jc LE BERRE

Reputation: 13

Try to use cx_freeze instead of pyinstaller, it worked for me.

Upvotes: 0

Related Questions