You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Numpy version pinning required with astropy.convolution in FITS display notebook #77
@jonesmg noticed following issue in displaying-images.ipynb in #76:
I had to revert my numpy version to 2.3 because the latest version (2.4) seems to be incompatible with astropy.convolution. This might trip up a less experienced python user.
I'm not sure exactly why I'm having this issue and you are not (I'm running on an M2 Macbook). I deleted my environment and started from scratch, doing the following:
conda create -n firefly python=3 astropy jupyterlab
conda activate firefly
pip install firefly_client
export FIREFLY_URL="https://irsa.ipac.caltech.edu/irsaviewer"
jupyter lab
When I tried to import the modules from astropy.convolution I hit the error: AttributeError: module 'numpy' has no attribute 'in1d'
Doing some Googling, I think this has been deprecated for a while, and removed in numpy v2.4, but astropy (v7.1) is still using it I guess. I rebuilt the environment using:
conda create -n firefly python=3 numpy=2.3 astropy jupyterlab
Then all the astropy stuff imports.
@jonesmg I tried conda create -n firefly python=3 astropy jupyterlab to reproduce your issue but I still don't see any errors with numpy when importing astropy.convolution (I'm on M1 though). This is how my astropy, numpy versions look:
@jonesmg Yes, that's correct and I was about to ask you to try conda-forge channel. Thanks for already realizing and doing that.
Somewhat surprisingly, when I add an explicit conda-forge channel. It installed much older packages.
It is indeed surprising.
I just remembered that I'm using the mamba solver rather than the classic conda solver. Perhaps that's the issue.
I just updated my conda which uses mamba-solver now by default. Doing conda create -n firefly -c conda-forge python=3 astropy jupyterlab still installs astropy v7.2.0 and numpy v2.4.1 for me.
Can you post output of conda config --show, I wonder if that can give us better idea for the version discrepancy?
Just to double check, I removed the environment and re-ran conda create -n firefly -c conda-forge python=3 astropy jupyterlab, and it now seems to work (see below). I tried updating conda and changing the solver between classic and mamba within the past few days. I'm not sure what exactly changed it, but it seems that with a fully up to date conda and conda-forge in channels, then it will install the right versions.
Just to double check, I removed the environment and re-ran conda create -n firefly -c conda-forge python=3 astropy jupyterlab, and it now seems to work (see below).
Interesting 😄 - I'm glad it worked out.
I tried updating conda and changing the solver between classic and mamba within the past few days. I'm not sure what exactly changed it, but it seems that with a fully up to date conda and conda-forge in channels, then it will install the right versions.
Yes, it's usually a good idea to update conda (or any other package manger for that matter). Looking at your conda config, I don't see conda-forge in default channels. It's a good idea to always use conda-forge over defaults channel, you can update your config as explained here: https://conda-forge.org/docs/user/introduction/#how-can-i-install-packages-from-conda-forge. Then you won't need to remember to supply -c conda-forge each time.
Another thing I do when creating environments is to use conda only for env creation and installing python (and non-python pacakges) and then use pip for installing python packages. So your example becomes:
Activity
jaladh-singhal commentedon Jan 27, 2026
@jonesmg I tried
conda create -n firefly python=3 astropy jupyterlabto reproduce your issue but I still don't see any errors with numpy when importing astropy.convolution (I'm on M1 though). This is how my astropy, numpy versions look:I suspect that the astropy version you're pulling in is not up-to-date which is requiring a numpy downgrade.
Can you please create a fresh environment again with above command, activate it, and then post the output of
conda list | grep -e numpy -e astropy?jonesmg commentedon Jan 27, 2026
@jaladh-singhal You're correct, my conda is installing a slightly older version of astropy when I run the same environment command.
Is conda-forge in your default channels perhaps.
Somewhat surprisingly, when I add an explicit conda-forge channel,
It installed much older packages:
jonesmg commentedon Jan 27, 2026
I just remembered that I'm using the mamba solver rather than the classic conda solver. Perhaps that's the issue.
jaladh-singhal commentedon Jan 28, 2026
@jonesmg Yes, that's correct and I was about to ask you to try conda-forge channel. Thanks for already realizing and doing that.
It is indeed surprising.
I just updated my conda which uses mamba-solver now by default. Doing
conda create -n firefly -c conda-forge python=3 astropy jupyterlabstill installs astropy v7.2.0 and numpy v2.4.1 for me.Can you post output of
conda config --show, I wonder if that can give us better idea for the version discrepancy?jonesmg commentedon Jan 29, 2026
My conda version is 25.11.1, and here is the conda config output:
Just to double check, I removed the environment and re-ran
conda create -n firefly -c conda-forge python=3 astropy jupyterlab, and it now seems to work (see below). I tried updating conda and changing the solver between classic and mamba within the past few days. I'm not sure what exactly changed it, but it seems that with a fully up to date conda and conda-forge in channels, then it will install the right versions.jaladh-singhal commentedon Jan 30, 2026
Interesting 😄 - I'm glad it worked out.
Yes, it's usually a good idea to update conda (or any other package manger for that matter). Looking at your conda config, I don't see conda-forge in default channels. It's a good idea to always use
conda-forgeoverdefaultschannel, you can update your config as explained here: https://conda-forge.org/docs/user/introduction/#how-can-i-install-packages-from-conda-forge. Then you won't need to remember to supply-c conda-forgeeach time.Another thing I do when creating environments is to use conda only for env creation and installing python (and non-python pacakges) and then use pip for installing python packages. So your example becomes:
jaladh-singhal commentedon Jan 30, 2026
I'm closing it as it got resolved by upgrading the machinery. Feel free to comment if this problem reoccurs.