photutils
photutils copied to clipboard
cannot import name 'circular_footprint' from 'photutils.utils
Hello, I install photutils successfully, but I can't import circular_footprint from photutils.utils, and I get the error:
ImportError: cannot import name 'circular_footprint' from 'photutils.utils' (/usr/local/lib/python3.7/dist-packages/photutils/utils/init.py)
The circular_footprint
function was added in version 1.5.0. You'll need to upgrade your version.
Thank you very much. So I guess I have a problem with installing photutils version 1.5 on my google colab. The new version requires python >= 3.8, so I install python 3.8 using the code below. I also change the sys.path, and I install photutils successfully using pip. The problem is that when I import photutils I get the following Error. I also tried to install photutils using conda, but the result is the same. I checked the python version is 3.8 and also the pip version. Is there any problem with the sys.path?
The error:
`/usr/local/lib/python3.8/sitepackages/photutils/geometry/init.py in
ModuleNotFoundError: No module named 'photutils.geometry.circular_overlap`
The way I install python 3.8 and photutils 1.5 on google colab: `!wget -O mini.sh https://repo.anaconda.com/miniconda/Miniconda3-py38_4.8.2-Linux-x86_64.sh
!chmod +x mini.sh
!bash ./mini.sh -b -f -p /usr/local
!conda install -q -y --prefix /usr/local jupyter
!python -m ipykernel install --name "py38" --user
import sys sys.path.append('/usr/local/lib/python3.8/site-packages/')
!pip install photutils==1.5 `
This is the same issue as https://github.com/astropy/photutils/issues/1402. I don't have any suggestions on how to upgrade Python on Google colab.