rodluger / starry

Tools for mapping stars and planets.
https://starry.readthedocs.io
MIT License
138 stars 32 forks source link

Error building numpy, exoplanet-core wheels on installation #313

Closed Shailen9901 closed 8 months ago

Shailen9901 commented 8 months ago

When I'm trying to install Starry using the terminal with 'pip install -U starry', I get an error saying it could not build the wheels for numpy and exoplanet-core.

My setup: starry 1.2.0 via pip Windows 11 64-bit operating system Python 3.11.6 pip 23.3.1 numpy 1.26.1

  1. I get the first error here:
Building wheels for collected packages: numpy, exoplanet-core
  Building wheel for numpy (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for numpy (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [344 lines of output]
      setup.py:63: RuntimeWarning: NumPy 1.21.1 may not yet support Python 3.11.
  1. Then another here:
        File "C:\Users\shail\AppData\Local\Temp\pip-install-i9nrezid\numpy_3e6ca358fd374801af6a0f73639e4299\numpy\distutils\ccompiler.py", line 88, in <lambda>
          m = lambda self, *args, **kw: func(self, *args, **kw)
                                        ^^^^^^^^^^^^^^^^^^^^^^^
      TypeError: CCompiler_spawn() got an unexpected keyword argument 'env'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for numpy
  Building wheel for exoplanet-core (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for exoplanet-core (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [196 lines of output]
  1. And finally at the end:
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for exoplanet-core
Failed to build numpy exoplanet-core
ERROR: Could not build wheels for numpy, exoplanet-core, which is required to install pyproject.toml-based projects
dfm commented 8 months ago

Thanks for the report. Starry isn't expected to work with your configuration. It requires numpy version <1.22 and it's only tested on Python 3.9 so you'll need to downgrade! That being said, I understand that there has been only somewhat limited success using starry on Windows. Unfortunately this project isn't being actively maintained any more so I wouldn't expect these dependencies to be updated in the near term.

Shailen9901 commented 8 months ago

Thanks for the quick reply, I'll try it out again with these versions.

Shailen9901 commented 8 months ago

After some debugging and installing the correct versions of the needed packages, I have starry installed and working.

RomanAkhmetshyn commented 5 months ago

After some debugging and installing the correct versions of the needed packages, I have starry installed and working.

What versions did you install? I'm using conda virtual env. on Win11 with Python==3.8.18, Numpy==1.20.3 and Starry==1.2.0, but I get errors like: ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 232 from C header, got 216 from PyObject

I also tried older versions of Numpy but none worked

RomanAkhmetshyn commented 5 months ago

Nevermind. After lots of trial and error, virtual environments and reinstalling Python packages, I could finally import Starry with: numpy==1.22.0 python==3.9.0

For some reason when I install Theano everything just breaks. I will try to see what I can do before posting a new Issue