Open HaroldMills opened 1 year ago
@HaroldMills That is surprising behavior, since M1 is arm64. What does Kevin's box return when he runs this on commandline?
python -c "import platform; print(platform.machine())"
? It should be 'arm64'.
@ses4j The following script:
import platform
print(f'machine: {platform.machine()}')
print(f'processor: {platform.processor()}')
print(f'system: {platform.system()}')
yielded:
machine: x86_64
processor: i386
system: Darwin
when we ran it yesterday on Kevin's computer. I think this might be because he's using an x86_64 Python via Rosetta, and hope to get some more Zoom time with him to look into that.
Do you have an M1 Mac?
I don't, but I was doublechecking with a coworker who does. His gives arm64. And yeah, I think your guess about his Python interpreter must be right (or he doesn't have the computer he thinks he does ;) ) Try the command line arch
and see what that gives. It doesn't use the python interpreter...
On Kevin Tolan's M1 MacBook Pro, Nighthawk 0.1.0 gets installed with the regular
tensorflow
package instead of with Apple'stensorflow-macos
package, and this causesnighthawk
to fail because of an illegal machine instruction when it runs.Nighthawk's
pyproject.toml
file aims to install TensorFlow in the form of thetensorflow-macos
package on Apple silicon (i.e. M1 and M2) Macs and the regulartensorflow
package everywhere else. It tries to do this with conditional dependencies that look at theplatform_system
andplatform_machine
environment markers, assuming that they will be"Darwin"
and"arm64"
if and only if the platform is an Apple silicon one. That works for my M2 Mac mini, but not for Kevin's M1 MacBook Pro. The marker values there are"Darwin"
and"x86_64"
, which unfortunately are the same as for Intel Macs (or at least my 2019 MacBook Pro).I do not see other markers in PEP 508 that seem like they would be useful for identifying Apple silicon Macs, and Google searches have not turned up a solution. A workaround that seemed to work in Kevin's case was to install the wrong TensorFlow package with Nighthawk and then do:
to replace it with the correct one.