I’m trying to upgrade from Python 3.11 to 3.12 and running into some problems, illustrated by iPython’s unwillingness to go with me. I’m doing all this on an Arm Macbook Air with Python installed by Homebrew, in case that matters. Here’s a copy of my Terminal activity, followed by my understanding of what’s happening. Any corrections are appreciated. The *** strings are for a bit of security, replacing pathnames (newlines inserted for readability).
(ds) *** % python --version
Python 3.12.3
(ds) *** % ipython
/opt/homebrew/lib/python3.11/site-packages/IPython/core/interactiveshell.py:937:
UserWarning: Attempting to work in a virtualenv. If you encounter problems,
please install IPython inside the virtualenv.
warn(
Python 3.11.9 (main, Apr 2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.3.9.4)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.24.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import sys
In [2]: print (sys.version)
3.11.9 (main, Apr 2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.3.9.4)]
In [3]: ^D
After getting the UserWarning the first time, I ran “pip install ipython”
AND “pipx install ipython” but I continue to get that UserWarning. I did pipx because pip told me the requirements were already satisfied. All of this activity is within the “ds” virtual environment.
I first encountered this when a “from sklearn import…” failed in a jupyter
notebook and did not fail from a “python” REPL. I have the feeling that
solving the ipython problem will get me a long way toward the original objective.