Re: Moving to python3.12 on M3 Max
"jack.jansen--- via Pythonmac-SIG" <[email protected]> Mon, 16 Sep 2024 22:04:27 +0200
| Newsgroups | gmane.comp.python.apple |
|---|---|
| Message-ID | <[email protected]> |
--===============2783543142415206013== Content-Type: multipart/alternative; boundary="Apple-Mail=_92062695-F921-44A9-96DD-60A74AE7DD09" --Apple-Mail=_92062695-F921-44A9-96DD-60A74AE7DD09 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hmm, I=E2=80=99m not really sure what could cause this. One of the reasons is that I=E2=80=99ve really moved away from the = =E2=80=9Cofficial=E2=80=9D 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=E2=80=99m = 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 =E2=80=9Cbest practice=E2=80=9D = 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=E2=80=99s 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) = =E2=80=9Cnumpy<2.0=E2=80=9D in there. -- Jack Jansen, <[email protected]>, 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 = <[email protected]> wrote: >=20 > 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: >=20 > issued package installs to correct import errors. >=20 > 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.=20 >=20 > 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.=20 > /usr/local/bin has symlinks to the Frameworks 3.12 dirs =E2=80=A6 >=20 > What am I missing? >=20 > Ideas appreciated. >=20 > Thanks > _______________________________________________ > Pythonmac-SIG maillist - [email protected] > https://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG --Apple-Mail=_92062695-F921-44A9-96DD-60A74AE7DD09 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"content-type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;">Hmm,<div>I=E2=80= =99m not really sure what could cause this.</div><div><br></div><div>One = of the reasons is that I=E2=80=99ve really moved away from the = =E2=80=9Cofficial=E2=80=9D Python installer for Mac to the = Homebrew-based install (see <a = href=3D"https://brew.sh/">https://brew.sh/</a> 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=E2=80=99m 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.</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Oh yes, a final = suggestion: the current =E2=80=9Cbest practice=E2=80=9D 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=E2=80=99s lots of documentation, but you can = start with <a = href=3D"https://docs.python.org/3/tutorial/venv.html">https://docs.python.= org/3/tutorial/venv.html</a> . 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) = =E2=80=9Cnumpy<2.0=E2=80=9D in there.</div><div><div> <span class=3D"Apple-style-span" style=3D"border-collapse: separate; = font-variant-ligatures: normal; font-variant-alternates: normal; = font-variant-numeric: normal; font-variant-east-asian: normal; = font-variant-position: normal; font-weight: normal; line-height: normal; = border-spacing: 0px; -webkit-text-decorations-in-effect: none;"><div><p = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; "><font face=3D"Helvetica" size=3D"3" style=3D"font: = normal normal normal 12px/normal Helvetica; ">--</font></p><p = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; "><font face=3D"Helvetica" size=3D"3" style=3D"font: = normal normal normal 12px/normal Helvetica; ">Jack Jansen, = <[email protected]>, http://www.cwi.nl/~jack</font></p><p = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; "><font face=3D"Helvetica" size=3D"3" style=3D"font: = normal normal normal 12px/normal Helvetica; ">If I can't dance I don't = want to be part of your revolution -- Emma Goldman</font></p><br = class=3D"Apple-interchange-newline"></div></span><br = class=3D"Apple-interchange-newline"> </div> <div><br><blockquote type=3D"cite"><div>On 8 Sep 2024, at 18:12, Brian = Richardson via Pythonmac-SIG <[email protected]> = wrote:</div><br class=3D"Apple-interchange-newline"><div><div>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:<br><br>issued package = installs to correct import errors.<br><br>python program executes = without throwing any errors/ warnings, but delivers different results. = It is a pandas<br>dataframe data manipulation program with read/write = from/to excel using pd.read_excel and pd.ExcelWriter. <br><br>execution = is from the Terminal command line.<br>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. = <br>/usr/local/bin has symlinks to the Frameworks 3.12 dirs = =E2=80=A6<br><br>What am I missing?<br><br>Ideas = appreciated.<br><br>Thanks<br>____________________________________________= ___<br>Pythonmac-SIG maillist - = [email protected]<br>https://mail.python.org/mailman/listinfo= /pythonmac-sig<br>unsubscribe: = https://mail.python.org/mailman/options/Pythonmac-SIG<br></div></div></blo= ckquote></div><br></div></body></html>= --Apple-Mail=_92062695-F921-44A9-96DD-60A74AE7DD09-- --===============2783543142415206013== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Pythonmac-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG --===============2783543142415206013==--