Hmm,
I’m not really sure what could cause this.

One of the reasons is that I’ve really moved away from the “official” Python 
installer for Mac to the Homebrew-based install (see https://brew.sh/ for info 
on Homebrew). The big advantage of the Homebrew install is that it allows 
multiple version of Python to co-exist peacefully. I get the impression that 
I’m not the only one who has gone to homebrew-Python, but that it is more or 
less standard nowadays, especially among developers. So it could be that you 
have found an issue that the developers of Pandas are not aware of.

Also, I notice that you have made 3 transitions at the same time: Intel -> 
Silicon, macOS 10.15 -> 10.14, Python 3.10 -> 3.12. And there are probably a 
whole lot of hidden changes: if you do `python3 -m pip freeze` on both machines 
you will get the versions of all installed packages. Comparing those might 
provide a lead. Especially have a look at the NumPy version: it has recently 
moved from 1.x to 2.0, and I know that that has caused various 
incompatibilities (although in general these would result in crashes, not in 
incorrect results).

My suggestion would be to try to do only one of these transitions, for example 
installing Python 3.12 on your Intel Mac and comparing that to 3.10 on your 
Intel Mac.

And if you do decide to give brew a try you can easily install Python 3.10 on 
your new M3 Mac and see how that goes.

Oh yes, a final suggestion: the current “best practice” for managing all the 
Python packages that you need for a certain application is to *not* install all 
the needed packages into your overall system-wide Python installation. In 
stead, create a virtual environment and install the packages in there. There’s 
lots of documentation, but you can start with 
https://docs.python.org/3/tutorial/venv.html . The advantage of using a venv is 
that you can easily experiment with different versions of packages by simply 
creating a second venv and installing (for example) “numpy<2.0” in there.
--
Jack Jansen, <jack.jan...@cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma Goldman



> On 8 Sep 2024, at 18:12, Brian Richardson via Pythonmac-SIG 
> <pythonmac-sig@python.org> wrote:
> 
> Issue transitioning from - Macos 10.15.7 on Intel iCore i7, python 3.10 --- 
> to Apple M3 Max, OS 14.6,  python 3.12.3:
> 
> issued package installs to correct import errors.
> 
> python program executes without throwing any errors/ warnings, but delivers 
> different results. It is a pandas
> dataframe data manipulation program with read/write from/to excel using 
> pd.read_excel and pd.ExcelWriter. 
> 
> execution is from the Terminal command line.
> PATH has 
> /usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.12/bin up 
> front, input data is the same, output is not the same. 
> /usr/local/bin has symlinks to the Frameworks 3.12 dirs …
> 
> What am I missing?
> 
> Ideas appreciated.
> 
> Thanks
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> https://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to