TST: importlib usage broke pyinstaller cron job
See original GitHub issue#11714 broken pyinstaller job. Any idea how to fix, @saimn or @mhvk ?
Example log: https://github.com/astropy/astropy/runs/3551720784?check_suite_focus=true
pyinstaller run-test: commands[1] | ./run_astropy_tests
Traceback (most recent call last):
File "astropy/utils/introspection.py", line 154, in minversion
File "importlib/metadata.py", line 530, in version
File "importlib/metadata.py", line 503, in distribution
File "importlib/metadata.py", line 177, in from_name
importlib.metadata.PackageNotFoundError: numpy
...
File ".../PyInstaller/loader/pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "astropy/utils/compat/numpycompat.py", line 13, in <module>
File "astropy/utils/decorators.py", line 536, in wrapper
File "astropy/utils/introspection.py", line 161, in minversion
KeyError: 'numpy'
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
importlib cannot find module after compling using Pyinstaller
I have a main script that import the module from another script (sub_script.py) using importlib. I also ...
Read more >Pyinstaller throws "Import Error:requests> 2.18.0 is required by ...
Coding example for the question Pyinstaller throws "Import Error:requests> 2.18.0 is required by the google.resumable media.requests subpackage."
Read more >subject:"\[PyInstaller\] pyinstaller" - The Mail Archive
Hi, I am trying to run a cron job on a Unix executable and I receive the following error: "Cannot open PyInstaller archive...
Read more >Python Package Best Practices - MolSSI Education
For this workshop, we are going to create a Python package that performs analysis and creates visualizations for molecules. We will start from...
Read more >Traits CHANGELOG — Traits 6.4 Documentation
Use of add_class_trait to add a List trait was broken in the presence of ... Add cron-job workflow to regularly test install of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve managed to get beyond the
metadata.version
error - but I’m now running into bizarrenumpy.distutils
errors, mainly related to convolution and the use of ctypes.I do think we should re-work the convolution extension to not use ctypes to load the extension but just use the regular C extension approach used by other modules, for consistency…
I think the weird thing is that
metadata.version('numpy')
apparently failed in the first part of thetry/except
- how can numpy be available and not found!?