You can use  

port notes python313

to get the answer:

--->  python313 has the following notes:
  To make this the default Python or Python 3 (i.e., the version run by the 
'python' or 'python3' commands), run
  one or both of:
  
      sudo port select --set python python313
      sudo port select --set python3 python313

Ciao

Franco



> On 11 Jul 2025, at 10:15, Christoph Kukulies via macports-users 
> <[email protected]> wrote:
> 
> I don't know how all these python versions got installed. They all may have 
> come over the years 
> and I didn't do anything special to keep them.
> 
> $ port rdependents
> The following ports are dependent on opencascade:
>   kicad
> $ sudo port reclaim
> Password:
> --->  Checking for unnecessary unrequested ports
> Found no unrequested ports without requested dependents.
> --->  Checking for inactive ports
> Found no inactive ports.
> --->  Building list of distfiles still in use
> --->  Searching for unused distfiles                     
> No unused files found.
> --->  Build location: /opt/local/var/macports/build
> --->  Scanning binaries for linking errors
> --->  No broken files found.                             
> --->  No broken ports found.
> 
> Two questions:
> 
> How do I select python-313 to python and python3? Something like
> 
> sudo port select --set python py313-python
> 
> doesn't seem to work.
> 
> ipython (which I already had set with the command below is at 3.13.2).
> 
> --
> Christoph
> 
>> Am 09.07.2025 um 15:42 schrieb Bill Cole 
>> <[email protected]>:
>> 
>> On 2025-07-09 at 08:30:18 UTC-0400 (Wed, 9 Jul 2025 14:30:18 +0200)
>> Christoph Kukulies via macports-users <[email protected]>
>> is rumored to have said:
>> 
>>> Thanks, Nils,
>>> 
>>> for clarifying. I understand.
>>> $ port installed | grep '^[[:space:]]*py'
>>>  py27-cairo @1.18.2_0+quartz+x11 (active)
>>>  py27-cython @3.0.11_0 (active)
>>>  py27-gobject @2.28.7_2+x11 (active)
>>>  py27-numpy @1.16.6_4+gfortran+openblas (active)
>>>  py27-oldest-supported-numpy @0.1_0 (active)
>>>  py27-pygtk @2.24.0_6+x11 (active)
>>>  py27-setuptools @44.1.1_0 (active)
>>>  py311-numpy @1.26.4_3+gfortran+openblas (active)
>>>  py311-oldest-supported-numpy @0.1_0 (active)
>>>  py311-olefile @0.47_0 (active)
>>>  py311-Pillow @9.5.0_1 (active)
>>>  py311-pybind11 @2.13.6_0 (active)
>>>  py311-tkinter @3.11.11_0 (active)
>>>  py311-wxpython-4.0 @4.2.2_1 (active)
>>>  py312-cairo @1.27.0_0+quartz+x11 (active)
>>>  py312-gobject3 @3.46.0_0 (active)
>>>  py312-mako @1.3.9_0 (active)
>>>  py312-markdown @3.7_0 (active)
>>>  py312-markupsafe @3.0.2_0 (active)
>>>  py312-setuptools @77.0.3_0 (active)
>>>  py313-cairo @1.27.0_0+quartz+x11 (active)
>>>  py313-gdbm @3.13.2_0 (active)
>>>  py313-gobject3 @3.50.0_0 (active)
>>>  py313-meson @1.7.0_0 (active)
>>>  py313-setuptools @75.8.0_0 (active)
>>>  python2_select @0.1_0 (active)
>>>  python3_select @0.1_0 (active)
>>>  python3_select-38 @0.1_1 (active)
>>>  python3_select-311 @0.1_1 (active)
>>>  python3_select-312 @0.1_1 (active)
>>>  python3_select-313 @0.1_1 (active)
>>>  python27 @2.7.18_10+lto+optimizations (active)
>>>  python37 @3.7.17_0+optimizations (active)
>>>  python38 @3.8.20_0+optimizations (active)
>>>  python311 @3.11.11_0+lto+optimizations (active)
>>>  python312 @3.12.9_0+lto+optimizations (active)
>>>  python313 @3.13.2_0+lto+optimizations (active)
>>>  python_select @0.3_10 (active)
>>>  python_select-38 @0.3_1 (active)
>>>  python_select-311 @0.3_1 (active)
>>>  python_select-312 @0.3_1 (active)
>>>  python_select-313 @0.3_1 (active)
>>> $
>> 
>> You should figure out *why* you have 4 different Pythons installed and 
>> remove those that you don't need. You may need to reinstall some non-python 
>> dependents with an explicit python version variant. It is likely that you 
>> can get everything consolidated under one version (or maybe 2, if you really 
>> do need the 2.7 stuff.) 'port rdepedents' is useful for finding the ports to 
>> target.
>> 
>> 
>>> So it looks like that for now. I did that port install py-jupyter. After 
>>> that I did
>>> 
>>> sudo port select --set ipython py313-ipython
>> 
>> That only affects the 'ipython' command. You need to fix the commands you 
>> actually use. Based on the installed list above, I don't see why the command 
>> you used didn't just fail.
>> 
>>> 
>>> But I still get:
>>> 
>>> $ which python3
>>> /opt/local/bin/python3
>>> $ python3
>>> Python 3.11.11 (main, Dec  7 2024, 11:56:41) [Clang 13.0.0 
>>> (clang-1300.0.29.3)] on darwin
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>> quit()
>>> $ which python
>>> /opt/local/bin/python
>>> $ python
>>> Python 3.11.11 (main, Dec  7 2024, 11:56:41) [Clang 13.0.0 
>>> (clang-1300.0.29.3)] on darwin
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>> quit()
>> 
>> To make the python and python3 commands point to python313, you need to use 
>> 'port select' for each of them.
>> 
>> 
>> 
>> -- 
>> Bill Cole
>> [email protected] or [email protected]
>> (AKA @[email protected] and many *@billmail.scconsult.com addresses)
>> Not Currently Available For Hire
> 

Reply via email to