With python 3.10.8, trying to use below requirement.txt failed to find dependencies.
Same backtrace could be obtained with python 3.8.15, as used below to match default python-inspector recommended version
ort@c8d70fdc61ff:~$ python-inspector -r req.txt --json-pdt source.txt
Traceback (most recent call last):
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/python_inspector/resolve_cli.py", line 238, in resolve_dependencies
resolution_result: Dict = resolver_api(
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/python_inspector/api.py", line 235, in resolve_dependencies
resolution, purls = resolve(
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/python_inspector/api.py", line 292, in resolve
resolved_dependencies, packages = get_resolved_dependencies(
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/python_inspector/api.py", line 330, in get_resolved_dependencies
resolver_results = resolver.resolve(requirements=requirements, max_rounds=max_rounds)
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/resolvelib/resolvers.py", line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/resolvelib/resolvers.py", line 373, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/resolvelib/resolvers.py", line 213, in _attempt_to_pin_criterion
criteria = self._get_updated_criteria(candidate)
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/resolvelib/resolvers.py", line 203, in _get_updated_criteria
for requirement in self._p.get_dependencies(candidate=candidate):
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/python_inspector/resolution.py", line 600, in get_dependencies
return list(self._iter_dependencies(candidate))
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/python_inspector/resolution.py", line 591, in _iter_dependencies
for r in self.get_requirements_for_package(purl=purl, candidate=candidate):
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/python_inspector/resolution.py", line 470, in get_requirements_for_package_from_pypi_simple
yield from get_requirements_from_python_manifest(
File "/opt/python/versions/3.8.15/lib/python3.8/site-packages/python_inspector/resolution.py", line 304, in get_requirements_from_python_manifest
raise Exception(
Exception: Unable to collect setup.py dependencies securely: .cache/thirdparty/extracted_sdists/conan-1.52.0/conan-1.52.0/setup.py
ort@c8d70fdc61ff:~$
With python 3.10.8, trying to use below requirement.txt failed to find dependencies. Same backtrace could be obtained with python 3.8.15, as used below to match default python-inspector recommended version
requirements.txt