Unable to install pyagrum with poetry
Environment
- pyagrum versions: 1.7.0 and 1.7.1
- platform: both MacOS and Debian based Docker container (python:3.10-slim-bullseye)
- python versions: both 3.8 and 3.10
Issue
I am trying add pyagrum to my project and i am using Poetry as a package manager.
I am following the standard procedure to add a package to a poetry project:
poetry add pyagrum==1.7.1
but i get this warning (and the installation process fails):
Warning: Validation of the RECORD file of pyAgrum-1.7.1-cp310-cp310-macosx_11_0_arm64.whl failed. Please report to the maintainers of that package so they can fix their build process. Details:
Unable to retrieve `RECORD` from <PYPOETRY_PATH>/artifacts/2e/98/71/447492f87af5b778625c7e03e43756f9f788411fa233a754f4928b7412/pyAgrum-1.7.1-cp310-cp310-macosx_11_0_arm64.whl: InvalidRecordEntry(elements=['/pyAgrum-1.7.1.dist-info/WHEEL', 'sha256=7942169389ca8d1c4a3a8add98eeac7189f9fc8bf971530073903bb02a07b8b3'], issues=['Row Index 0: expected 3 elements, got 2'])
If I manually add pyagrum
as a dependency and try to install it using poetry install -vvv
, I get the following:
Stack trace:
8 ~/dev/venv/lib/python3.10/site-packages/poetry/installation/executor.py:280 in _execute_operation
278│
279│ try:
→ 280│ result = self._do_execute_operation(operation)
281│ except EnvCommandError as e:
282│ if e.e.returncode == -2:
7 ~/dev/venv/lib/python3.10/site-packages/poetry/installation/executor.py:382 in _do_execute_operation
380│ return 0
381│
→ 382│ result: int = getattr(self, f"_execute_{method}")(operation)
383│
384│ if result != 0:
6 ~/dev/venv/lib/python3.10/site-packages/poetry/installation/executor.py:502 in _execute_install
500│
501│ def _execute_install(self, operation: Install | Update) -> int:
→ 502│ status_code = self._install(operation)
503│
504│ self._save_url_reference(operation)
5 ~/dev/venv/lib/python3.10/site-packages/poetry/installation/executor.py:560 in _install
558│ self._remove(operation.initial_package)
559│
→ 560│ self._wheel_installer.install(archive)
561│ finally:
562│ if cleanup_archive:
4 ~/dev/venv/lib/python3.10/site-packages/poetry/installation/wheel_installer.py:108 in install
106│ except _WheelFileValidationError as e:
107│ self.invalid_wheels[wheel] = e.issues
→ 108│ install(
109│ source=source,
110│ destination=self._destination.for_source(source),
3 ~/dev/venv/lib/python3.10/site-packages/installer/_core.py:96 in install
94│
95│ # Write all the files from the wheel.
→ 96│ for record_elements, stream, is_executable in source.get_contents():
97│ source_record = RecordEntry.from_elements(*record_elements)
98│ path = source_record.path
2 ~/dev/venv/lib/python3.10/site-packages/installer/sources.py:301 in get_contents
299│ record_lines = self.read_dist_info("RECORD").splitlines()
300│ records = parse_record_file(record_lines)
→ 301│ record_mapping = {record[0]: record for record in records}
302│
303│ for item in self._zipfile.infolist():
1 ~/dev/venv/lib/python3.10/site-packages/installer/sources.py:301 in <dictcomp>
299│ record_lines = self.read_dist_info("RECORD").splitlines()
300│ records = parse_record_file(record_lines)
→ 301│ record_mapping = {record[0]: record for record in records}
302│
303│ for item in self._zipfile.infolist():
InvalidRecordEntry
Row Index 0: expected 3 elements, got 2
As the warning suggests, it is probably related to the build process.
Can you please provide any feedback/suggestion/help?