bilby-dev / bilby

A unified framework for stochastic sampling packages and gravitational-wave inference in Python.
https://bilby-dev.github.io/bilby/
MIT License
64 stars 72 forks source link

bilby installation on Windows #744

Closed bilby-bot closed 1 month ago

bilby-bot commented 1 year ago

In GitLab by @git.ligo:michael.williams on May 22, 2023, 18:22

When installing bilby in C/I workflow on GitHub, I've run into errors that cause the installation to fail (see below).

It's unclear to me when this started and what's causing it, but it seems to depend on the order packages are installed and, possibly, bilby.cython. However, I do not have access to a Windows machine to test this.

For now, I have addressed this by changing the order packages are install in the C/I in question (see https://github.com/mj-will/nessai/pull/304)

Error

Copied from: https://github.com/mj-will/python-test-package/actions/runs/5012152421/jobs/8983763986?pr=1

pip install -e .[dev,gw]
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    pythonLocation: C:\hostedtoolcache\windows\Python\3.10.11\x64
    PKG_CONFIG_PATH: C:\hostedtoolcache\windows\Python\3.10.11\x64/lib/pkgconfig
    Python_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.10.11\x64
    Python2_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.10.11\x64
    Python3_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.10.11\x64
Requirement already satisfied: pip in c:\hostedtoolcache\windows\python\3.10.11\x64\lib\site-packages (23.1.2)
Obtaining file:///D:/a/python-test-package/python-test-package
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Collecting bilby (from py-test-package==0.1.dev1+g634a86e)
  Downloading bilby-2.1.1-py3-none-any.whl (2.3 MB)
     ---------------------------------------- 2.3/2.3 MB 24.1 MB/s eta 0:00:00
Collecting pytest (from py-test-package==0.1.dev1+g634a86e)
  Downloading pytest-7.3.1-py3-none-any.whl (320 kB)
     ------------------------------------- 320.5/320.5 kB 10.0 MB/s eta 0:00:00
Collecting bilby.cython>=0.3.0 (from bilby->py-test-package==0.1.dev1+g634a86e)
  Downloading bilby.cython-0.4.1.tar.gz (251 kB)
     ------------------------------------- 251.6/251.6 kB 16.1 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  error: subprocess-exited-with-error

  Getting requirements to build wheel did not run successfully.
  exit code: 1

  [17 lines of output]
  Traceback (most recent call last):
    File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\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:\hostedtoolcache\windows\Python\3.10.11\x64\lib\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\runneradmin\AppData\Local\Temp\pip-build-env-bu9b_hd6\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
  Getting requirements to build wheel: finished with status 'error'
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-bu9b_hd6\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
      self.run_setup()
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-bu9b_hd6\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
      super(_BuildMetaLegacyBackend,
    File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-bu9b_hd6\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 4, in <module>
  ModuleNotFoundError: No module named 'numpy'
  [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.
Error: Process completed with exit code 1.
bilby-bot commented 1 year ago

In GitLab by @git.ligo:colm.talbot on Jun 25, 2023, 01:23

moved to colm.talbot/bilby-cython#4