Getting requirements to build wheel ... error

`Hi all,
I was intending to install poliastro and followed the wiki page of them to install it properly.
I am using Python 3.12 with latest pip installed.

any solution?
I am new here. This is my 1st post. Please correct me or if you need more info please comment. I am badly in need of help
when I use:

`pip install poliastro[jupyter] pytest`

then this happen:


C:\Users\wadis>pip install poliastro[jupyter] pytest
Defaulting to user installation because normal site-packages is not writeable
Collecting pytest
  Using cached pytest-7.4.3-py3-none-any.whl.metadata (7.9 kB)
Collecting poliastro[jupyter]
  Using cached poliastro-0.12.0-py3-none-any.whl (118 kB)
Requirement already satisfied: numpy in c:\users\wadis\appdata\roaming\python\python312\site-packages (from poliastro[jupyter]) (1.26.2)
Collecting astropy<4.*,>=3.1 (from poliastro[jupyter])
  Using cached astropy-3.2.3.tar.gz (8.0 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      Traceback (most recent call last):
        File "C:\Users\wadis\AppData\Roaming\Python\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\wadis\AppData\Roaming\Python\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\wadis\AppData\Roaming\Python\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\wadis\AppData\Local\Temp\pip-build-env-xqd0m2qv\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\wadis\AppData\Local\Temp\pip-build-env-xqd0m2qv\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "C:\Users\wadis\AppData\Local\Temp\pip-build-env-xqd0m2qv\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "C:\Users\wadis\AppData\Local\Temp\pip-build-env-xqd0m2qv\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 14, in <module>
        File "c:\users\wadis\appdata\local\temp\pip-install-v3cqojv5\astropy_38b6e396c73541be850102ffaf1dd1cd\astropy_helpers\astropy_helpers\distutils_helpers.py", line 18, in <module>
          from .utils import silence
        File "c:\users\wadis\appdata\local\temp\pip-install-v3cqojv5\astropy_38b6e396c73541be850102ffaf1dd1cd\astropy_helpers\astropy_helpers\utils.py", line 4, in <module>
          import imp
      ModuleNotFoundError: No module named 'imp'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.```
`

I’m moving this into Python Help again; please use Packaging for discussing how to improve packaging, and Python Help for asking questions on using Python packaging (with the packaging-help tag).

Your problem is that you’re trying to install a package on Python 3.12 but that package doesn’t support Python 3.12 yet.

2 Likes

Thanks for answering.

Also note that the package you’re trying to install isn’t maintained anymore.

[TheSnowFall] Erfan Mahmud Tushar
https://discuss.python.org/u/thesnowfall TheSnowFall
November 29

`Hi all,
I was intending to install poliastro
https://poliastro-py.readthedocs.io/en/latest/getting_started.html and
followed the wiki page of them to install it properly.
I am using Python 3.12 with latest pip installed.

well, something in this chain isn’t 3.12-ready…

this is garbling up when I try to “reply”, so a short paste from the
output instead:

import imp
       ModuleNotFoundError: No module named 'imp'

The imp module was removed at 3.12, so that’s not gonna work.

any solution?

Maybe try an older Python. This page shows the claimed level of support:

those aren’t always accurate, but it’s not claiming to support more
than 3.8-3.10. So maybe try with 3.10 and see if things work for you?

What’s more, it’s not going to be updated. The project is archived and
has no maintainers, and unless/until someone revives it, the future
doesn’t look bright.

1 Like