Search code examples
altair

How to install Altair 4.2.2 (Mac M2 chip, Python 3)?


I am trying to get this demo working for the Radio Galaxy Zoo project. There is a requirements.txt file to install packages with pip, and when I go to run it, I get the following error:

ERROR: Could not find a version that satisfies the requirement altair==4.2.2 (from versions: 1.0.0rc1, 1.0.0rc2, 1.0.0rc3, 1.0.0rc4, 1.0.0, 1.2.0, 1.2.1, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.4.1, 3.0.0rc1, 3.0.0, 3.0.1, 3.1.0, 3.2.0, 3.3.0, 4.0.0, 4.0.1, 4.1.0)

ERROR: No matching distribution found for altair==4.2.2

I am running a fresh conda environment on python 3.6.3, and my machine uses an Apple M2 chip. My suspicion is there's an issue with chip compatibility but I am unsure, and unsure how to verify. Thank you.


Solution

  • The answer to the original question is this: the minimal Python requirement for altair==4.2.2 is 3.7.

    However, as I tried to install the rest of the packages, more problems show up.

    I tried on my M2 Pro MBP from Python 3.6 all the way to 3.10, yet none of them works out of the box to install the entirety of the requirements.txt. At this point, my suggestion is to go through each failed package version, check its listing on PyPI, go to the "Download Files" link and examine whether the desired package version is available on M2 MBP. If it is not available, you might have to build the package from scratch.