[Python] Converting a GIS(Geographical Information System) python code into an executable file

Discussão em 'Python' iniciado por Stack, Março 11, 2025.

  1. Stack

    Stack Membro Participativo

    I am working on a GIS application that uses Satellite images to capture stuff like vegetation, moisture and water bodies from the earth surface. I am trying to use PyInstaller to covert the code into a workable application. However, I keep getting the error; FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Name\AppData\Local\Temp\_MEI159642\bqplot\map_data/WorldMap.json'

    The bqplot library is trying to load WorldMap.json using a relative path, which doesn't work correctly when the application is bundled by PyInstaller. When bundling, I specified the path using --add-data "LINK to WorldMap.json". I also did this with another file called datasets.txt which was causing a similar error.

    My challenge is that, having done this, the code now works on my machine but can't work on anybody else's machine. I am confused on how to proceed and I would appreciate any help

    I used the absolute paths and the program only works on my end. It doesn't work on any other machine

    Continue reading...

Compartilhe esta Página