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

Fix the sherpa installation #5233

Open
bkhelifi opened this issue Apr 22, 2024 · 5 comments
Open

Fix the sherpa installation #5233

bkhelifi opened this issue Apr 22, 2024 · 5 comments
Labels
installation issue Issues encountered when installing gammapy
Milestone

Comments

@bkhelifi
Copy link
Member

Gammapy version
gammapy 1.2, under Linux

Bug description
The installation of the environment with mamba/conda fails because of sherpa. This has been reported by several users.

      checking dependency style of gcc... gcc3
      checking for bison... no
      checking for byacc... no
      checking for yacc... no
      configure: error: bison/byacc/yacc not found.
                Please install bison
      configure: error: ./configure failed for region-4.14
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for sherpa

Even afterwards after an installation without sherpa, the command pip install sherpa==4.16 fails.

@bkhelifi bkhelifi added the bug label Apr 22, 2024
@registerrier registerrier added installation issue Issues encountered when installing gammapy and removed bug labels Apr 22, 2024
@registerrier
Copy link
Contributor

One option here is to remove the version constraint on sherpa, or use 4.15 instead (in which case conda should work).

@Astro-Kirsty
Copy link
Member

Do we know what versions of Linux this happens for?
Just curious, because I did not encounter this with Ubuntu 22.04

@bkhelifi
Copy link
Member Author

I have the same ubuntu version.
Within the env of the version 1.2, pip install sherpa==4.15 leads to the same error...
I have in the output "configure: error: bison/byacc/yacc not found" for the configuration of region-4.14

@vmharvey
Copy link

I have the same issue on Ubuntu 22.04.4. I found a bug on the sherpa issue tracker which shows the same problem occurring: sherpa/sherpa#828. From this comment sherpa/sherpa#828 (comment), assuming it's still true after a few years, it appears that installing sherpa via pip triggers a source install, which requires the user to have all the sherpa dependencies, including the build system bison.

Modifying the env file by removing sherpa==4.16 from the pip section and putting sherpa=4.15 in the conda section fixed the problem for me:

  - tqdm
  - sherpa=4.15
  - pip:
    - ray[default]==2.9

It appears that the official sherpa channel on anaconda only has version 4.15, hence the small downgrade required.

@Astro-Kirsty
Copy link
Member

Sherpa was initially moved to the pip installation due to both apple and windows systems not being able to install it through this method.
#4983 (comment)
As a user of these systems sherpa cannot be installed outside pip, so this line of the environment file needs to be removed.

Not sure how we wish to proceed here?
Appears to be some issue with any combination with at least one operating system :(

@registerrier registerrier added this to the 1.2.1 milestone May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation issue Issues encountered when installing gammapy
Projects
None yet
Development

No branches or pull requests

4 participants