achael / eht-imaging

Imaging, analysis, and simulation software for radio interferometry
https://achael.github.io/eht-imaging/
GNU General Public License v3.0
5.29k stars 496 forks source link

Lastest numpy 1.24.2 does not work with ehtim #165

Closed rohandahale closed 1 year ago

rohandahale commented 1 year ago

pip install ehtim will install numpy 1.24.2. In a python 3.8 shell when you do import ehtim, you will get an error:

ImportError: cannot import name 'bool' from 'numpy'

The correct way to install ehtim should be:

pip install ehtim numpy==1.21.1

Bravco commented 1 year ago

You are correct.

wumpus commented 1 year ago

Please see https://github.com/achael/eht-imaging/pull/163 -- it's merged in dev, and @achael has not made a release to the main branch since.

shitwolfymakes commented 1 year ago

Is this still active? There's a number of bugs and code duplication I could fix but it won't mean much if it doesn't get merged

wumpus commented 1 year ago

This particular problem is already fixed in the dev branch. @achael prefers that you make bugfixes (hopefully tested!) against the dev branch.

If you have additional bugs or see code duplication, please open separate issues.

shitwolfymakes commented 1 year ago

Not referring to this, asking about the project as a whole. I already opened #164

wumpus commented 1 year ago

As a whole, the project is quite active. I was about to comment on that PR.

shitwolfymakes commented 1 year ago

Copy, thanks

rohandahale commented 1 year ago

This is issue is closed now but I will keep it open for people to see this.

To install eht-imaging 1.2.4 use pip with numpy 1.21.1: pip install ehtim numpy==1.21.1

To install eht-imaging 1.2.5 use the dev branch on GitHub: git clone --branch dev https://github.com/achael/eht-imaging.git

conda create --name ehtim_dev
conda activate ehtim_dev
conda install python=3.8.16

cd eht-imaging
python setup.py build
python setup.py install

pip install pandas==2.0.1 matplotlib==3.7.1 packaging astropy==5.2.2 hdrhistogram skyfield

conda install scikit-image networkx
conda install -c conda-forge pynfft

For M1 Pro and M1 Max chips, follow the issue #161 for NFFT installation and not the pynfft on conda.

achael commented 1 year ago

thank you @rohandahale and apologies for the late action on this. I will investigate next week if we can easily make ehtim compatible with numpy 1.2.4. and make a new release

achael commented 1 year ago

eht-imaging 1.2.5 seems to be working with numpy version 1.24 at the moment (though please raise an issue if anything else comes up). Since @rohandahale's installation instructions for M1 macs has been added to the README, I am now closing this issue.