pycsw-admin.py importlib errors on Windows
Description
Building with pycsw-master (because pycsw-2.6.1 through pip causes python39.dll errors, as this is with Python 3.10.0 embedded), loading pycsw GetCapabilities request through the browser with mod_wsgi has no issues, however, on the commandline:
pycsw-admin.py -h
throws the following error:
Traceback (most recent call last):
File "C:\ms4w\Python\Scripts\pycsw-admin.py-script.py", line 33, in <module>
sys.exit(load_entry_point('pycsw==3.0.dev0', 'console_scripts', 'pycsw-admin.py')())
File "C:\ms4w\Python\Scripts\pycsw-admin.py-script.py", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "C:\ms4w\Python\Lib\importlib\metadata\__init__.py", line 919, in distribution
return Distribution.from_name(distribution_name)
File "C:\ms4w\Python\Lib\importlib\metadata\__init__.py", line 518, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for pycsw
Environment
- operating system: Windows
- Python version: 3.10.0
- pycsw version: 3.0.dev0
- source/distribution
- [x ] git clone
- built for MS4W, on Visual Studio 2019
- [ ] DebianGIS/UbuntuGIS
- [ ] PyPI
- [ ] zip/tar.gz
- [ ] other (please specify):
- [ ]
- [x ] git clone
- web server
- [ x] Apache/mod_wsgi
- [ ] CGI
- [ ] other (please specify):
Steps to Reproduce
python setup.py build
python setup.py install
Additional Information
In an old pycsw-2.6.0 installation (where I used pip install), has the following contents of /Python/Lib/site-packages/
pycsw
pycsw-2.6.0.dist-info (that contains METADATA etc)
Whereas with this 3.0.dev0 install /Python/Lib/site-packages/ only has:
pycsw-3.0.dev0-py3.10.egg
pycsw
EGG-INFO
Discussion
I'm thinking I did something wrong with the install steps, but, I don't see any difference in my steps above. Advice needed :)
I think the /site-packages/ structure is fine, but I do notice much changes in the pycsw-admin.py-script.py file, checking for metadata etc (compared to an old pycsw-2.6.0 one).