CosmicStudioSoftware / OMMBV

Orthogonal Multipole Magnetic Basis Vectors - Complete orthogonal vector basis with accurate field-line mapping of electric fields and ion drifts within multipole magnetic fields
BSD 3-Clause "New" or "Revised" License
10 stars 7 forks source link

OMMBV pip install started failing #62

Open sapols opened 2 months ago

sapols commented 2 months ago

Describe the bug I'm not sure what changed but I'm no longer able to pip install OMMBV in various environments, including my personal MacBook and inside GitHub Actions. I first noticed this when the PyHC environment pipeline failed in GitHub trying to pip install OMMBV. The ultimate cause of the failure seems to be ModuleNotFoundError: No module named 'distutils.msvccompiler'.

To Reproduce Steps to reproduce the behavior:

  1. Run pip install OMMBV

Expected behavior I'd expect OMMBV to install but it fails.

Desktop (please complete the following information):

Additional context Here's the error output I keep getting:

Collecting OMMBV
  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
  ╰─> [33 lines of output]
      <string>:18: DeprecationWarning:

        `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
        of the deprecation of `distutils` itself. It will be removed for
        Python >= 3.12. For older Python versions it will remain present.
        It is recommended to use `setuptools < 60.0` for those Python versions.
        For more details, see:
          https://numpy.org/devdocs/reference/distutils_status_migration.html

      Traceback (most recent call last):
        File "/Users/shpo9723/opt/anaconda3/envs/python_3_10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/shpo9723/opt/anaconda3/envs/python_3_10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/shpo9723/opt/anaconda3/envs/python_3_10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/4f/t664wvxn4nd8864qfqwknh7r008q5h/T/pip-build-env-9wawv888/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "/private/var/folders/4f/t664wvxn4nd8864qfqwknh7r008q5h/T/pip-build-env-9wawv888/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/4f/t664wvxn4nd8864qfqwknh7r008q5h/T/pip-build-env-9wawv888/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 503, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/4f/t664wvxn4nd8864qfqwknh7r008q5h/T/pip-build-env-9wawv888/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 18, in <module>
        File "/private/var/folders/4f/t664wvxn4nd8864qfqwknh7r008q5h/T/pip-build-env-9wawv888/overlay/lib/python3.10/site-packages/numpy/distutils/core.py", line 24, in <module>
          from numpy.distutils.command import config, config_compiler, \
        File "/private/var/folders/4f/t664wvxn4nd8864qfqwknh7r008q5h/T/pip-build-env-9wawv888/overlay/lib/python3.10/site-packages/numpy/distutils/command/config.py", line 19, in <module>
          from numpy.distutils.mingw32ccompiler import generate_manifest
        File "/private/var/folders/4f/t664wvxn4nd8864qfqwknh7r008q5h/T/pip-build-env-9wawv888/overlay/lib/python3.10/site-packages/numpy/distutils/mingw32ccompiler.py", line 27, in <module>
          from distutils.msvccompiler import get_build_version as get_build_msvc_version
      ModuleNotFoundError: No module named 'distutils.msvccompiler'
      [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.
sapols commented 2 months ago

I'll note that changing my setuptools version didn't seem to help (I tried <60.0 as the warning suggests, and upgrading to the latest) and I don't believe the numpy version is crucial either because it used to install fine with 1.26.4 but now fails with 1.26.4 still.