Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyoculus build is crashing simsopt CI #10

Closed
landreman opened this issue Sep 3, 2024 · 3 comments
Closed

pyoculus build is crashing simsopt CI #10

landreman opened this issue Sep 3, 2024 · 3 comments

Comments

@landreman
Copy link

Starting last week, the simsopt CI's have been failing at the step where pyoculus is pip-installed. Here's one example. The error message is below. Todd Elder is having the same error when trying to install pyoculus on his laptop. It looks like it's an issue with pyoculus's setup.py system. @smiet @zhisong @mbkumar Any idea how to fix this?

Collecting pyoculus
  Downloading pyoculus-0.3.1.tar.gz (844 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 844.2/844.2 kB 58.6 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-qhbh225t/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
        File "/tmp/pip-build-env-qhbh225t/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-qhbh225t/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 2, in <module>
        File "/tmp/pip-build-env-qhbh225t/overlay/lib/python3.9/site-packages/numpy/distutils/core.py", line 24, in <module>
          from numpy.distutils.command import config, config_compiler, \
        File "/tmp/pip-build-env-qhbh[225](https://github.com/hiddenSymmetries/simsopt/actions/runs/10683512465/job/29611749973#step:15:226)t/overlay/lib/python3.9/site-packages/numpy/distutils/command/config.py", line 19, in <module>
          from numpy.distutils.mingw32ccompiler import generate_manifest
        File "/tmp/pip-build-env-qhbh225t/overlay/lib/python3.9/site-packages/numpy/distutils/mingw32ccompiler.py", line 28, 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.
@smiet
Copy link
Collaborator

smiet commented Sep 3, 2024 via email

@smiet
Copy link
Collaborator

smiet commented Sep 5, 2024

@mbkumar @landreman:

The issue is with an unpinned version of setuptools, and changes to distutils, as explained here: pypa/setuptools#3532.

Pointing simsopt to the meson-built pyoculus fixes pyoculus, but now VMEC2000 fails.

There are some suggested fixes, such as: pypa/setuptools#3505 (comment):

However, having setuptools<65 in requirements.txt with pip install --no-use-pep517 does fix it

@smiet
Copy link
Collaborator

smiet commented Sep 11, 2024

pinning setuptools to lt. 65, (PR #11 ) as I don't like the setuptools solution (PR #8 ). Confirmed to work in the branch used by Todd Elder.

Re-open if this does not fix.

@smiet smiet closed this as completed Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@landreman @smiet and others