Difficulty Installing Pixell and Healpy Python Libraries on M1 iMacs

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Dwaipayan Chanda
Posts: 1
Joined: June 08 2023
Affiliation: University of Southern California

Difficulty Installing Pixell and Healpy Python Libraries on M1 iMacs

Post by Dwaipayan Chanda »

Hello everyone,

Many members of our group are having difficulty with installing/importing the healpy and pixell python libraries using pip or conda install on our Apple iMacs with M1 processors. Our devices are all running macOS Ventura 13.4, and we are using jupyter notebook to run our python code.

Installing pixell appears to display the same error message for two of our computers: “Failed to prepare Mac OS X properly.” Whether or not we attempt to install in the terminal or in a jupyter notebook, the same error message shows:
pixell_1.png (546.55 KiB) Viewed 8591 times
Installing the healpy library, on the other hand, was successful, but is causing problems during importing for some of our devices and not others. For instance, one of our computers displays an error with a method being imported:
healpy_1.png (337.17 KiB) Viewed 8590 times
healpy_2.png (361.6 KiB) Viewed 8590 times
On another computer however, the problems with healpy were not encountered at all, and it was successfully imported as well.

Notably, both of these libraries installed perfectly fine on our personal computers, on both a Macbook Pro as well as a Windows laptop (running WSL). They were successfully installed just using pip and conda. So, we were suspecting that the new M1 chip architecture on our iMacs may be playing a role in these difficulties in importing python libraries.

We were wondering if similar problems were encountered by others when working with the pixell or healpy python libraries (or any other python libraries) on the new Apple iMacs, and if anyone had found a solution/an explanation for the error. Thank you for your help!
Omar Darwish
Posts: 11
Joined: October 01 2019
Affiliation: unige

Re: Difficulty Installing Pixell and Healpy Python Libraries on M1 iMacs

Post by Omar Darwish »

I am running Monterey OS on a MacBook Pro M1. Did not have any problems for both.

Did you check your numpy version? I would do this.

And it seems you do not have a gfortran or brew. If I am not mistaken pixell setup file had some changes to allow installation on Mac M1 (e.g. https://github.com/simonsobs/pixell/pull/196).
Post Reply