Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with pyproj 3.4.0 , package not found #7227

Closed
6 tasks done
aymondebroglie opened this issue Nov 7, 2022 · 4 comments · Fixed by pyinstaller/pyinstaller-hooks-contrib#505
Closed
6 tasks done
Labels
triage Please triage and relabel this issue

Comments

@aymondebroglie
Copy link

Description of the issue

I try to run pyinstaller on the following simple test.py file

import pyproj

print(pyproj.__version__)

With pyproj : 3.3.1

pyinstaller test.py; ./dist/test/test -> 3.3.1

With pyproj 3.4.0 I get the following error message

  File "test.py", line 1, in <module>
    import pyproj
  File "PyInstaller/loader/pyimod02_importers.py", line 499, in exec_module
  File "pyproj/__init__.py", line 70, in <module>
  File "importlib/metadata.py", line 569, in version
  File "importlib/metadata.py", line 542, in distribution
  File "importlib/metadata.py", line 196, in from_name
importlib.metadata.PackageNotFoundError: pyproj 

Context information (for bug reports)

  • Output of pyinstaller --version: 5.6.2

  • Version of Python: 3.9.12

  • Platform: Linux (Ubuntu)

  • How you installed Python: Through conda

  • Did you also try this on another platform? Does it work there? Did not try

  • try the latest development version, using the following command:

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

same error

Make sure everything is packaged correctly

  • start with clean installation
  • use the latest development version
  • Run your frozen program from a command window (shell) — instead of double-clicking on it
  • Package your program in --onedir mode
  • Package without UPX, say: use the option --noupx or set upx=False in your .spec-file
  • Repackage you application in verbose/debug mode. For this, pass the option --debug to pyi-makespec or pyinstaller or use EXE(..., debug=1, ...) in your .spec file.

A minimal example program which shows the error

import pyproj

print(pyproj.__version__)

Stacktrace / full error message

Running in debug mode, full logs attached
bug-pyproj-log.txt

Please also see https://github.com/pyinstaller/pyinstaller/wiki/How-to-Report-Bugs
for more about what would use to solve the issue.

@aymondebroglie aymondebroglie added the triage Please triage and relabel this issue label Nov 7, 2022
@rokm
Copy link
Member

rokm commented Nov 7, 2022

See pyinstaller/pyinstaller-hooks-contrib#505 - looks like we aren't going to be fixing this, but rather wait for next pyproj release.

@rokm
Copy link
Member

rokm commented Nov 7, 2022

As a work-around, you can add --copy-metadata pyproj to your PyInstaller command.

@aymondebroglie
Copy link
Author

Thanks you for the quick answer , the work around seems to be perfect !

@rokm
Copy link
Member

rokm commented Nov 8, 2022

This should now also work out-of-the-box with latest release of pyinstaller-hooks-contrib.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage Please triage and relabel this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants