2

I recently wrote a package which is on 1.2.9 but when trying to import it using pip install rolimons Python tries to import 1.2.9 which fails and moves on until version 1.1.3 which is the only version that doesn't error out.
Here is the error:

ERROR: Command errored out with exit status 1:
     command: /home/runner/rolimonspy-test/venv/bin/python3 /home/runner/rolimonspy-test/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp89bhulpc
         cwd: /tmp/pip-install-baj2a_r_/rolimons_41a3df9c7f414766a57996a21dc8cd26
    Complete output (16 lines):
    Traceback (most recent call last):
      File "/home/runner/rolimonspy-test/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 280, in <module>
        main()
      File "/home/runner/rolimonspy-test/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 263, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/home/runner/rolimonspy-test/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 133, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/tmp/pip-build-env-029qi198/overlay/lib/python3.8/site-packages/poetry/core/masonry/api.py", line 41, in prepare_metadata_for_build_wheel
        builder = WheelBuilder(poetry)
      File "/tmp/pip-build-env-029qi198/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 56, in __init__
        super().__init__(poetry, executable=executable)
      File "/tmp/pip-build-env-029qi198/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/builder.py", line 83, in __init__
        self._module = Module(
      File "/tmp/pip-build-env-029qi198/overlay/lib/python3.8/site-packages/poetry/core/masonry/utils/module.py", line 69, in __init__
        raise ModuleOrPackageNotFound(
    poetry.core.masonry.utils.module.ModuleOrPackageNotFound: No file/folder found for package python-template

More information about the structure and package here:

sinoroc
  • 18,409
  • 2
  • 39
  • 70
walker
  • 444
  • 2
  • 12
  • It looks to me like you only need to remove the `pyproject.toml` file, and everything will be fine again. -- What happens is that your source distributions are not build-able into a wheel, because of the faulty `pyproject.toml` file, so since `pip` can not build a wheel, it moves on to the next lower version of your project until it finds one that is build-able, which happens to be `1.1.3`. -- Either remove `pyproject.toml` file (easy solution), or fix it to something that allows your project to be built (more complex solution). – sinoroc Sep 08 '22 at 19:51

0 Answers0