pythonexepyproj

importlib.metadata.PackageNotFoundError: No package metadata was found for pyproj


I wrote a code using the pyproj library and converted this code to an exe file for use on another computer. I added the pyproj to the requirements.txt file. And I installed the library with the requirements.txt file on the other computer I will use. When I run the exe file, I get the following error:

importlib.metadata.PackageNotFoundError: No package metadata was found for pyproj

I'd be glad if you can help.


Solution

  • Here is my solution for those who have problems like above while running the exe file:

     pyinstaller --onefile --copy-metadata pyproj "example.py"
    

    For now this seems to have fixed the problem.