[Tutor] PYTHON INSTALLATION PROBLEM
Bryan O'Brien
bryan.m.obrien at gmail.com
Sat Oct 30 07:10:24 EDT 2021
So /usr/bin precedes your other python installations. This is expected. Don't modify /usr/bin/python. The operating system might depend on its existence.
Rather, pick one of the paths containing python3, and modify your ~/.zshrc - placing this python3 location before /usr/bin.
You'll have to restart the terminal (or source ~/.zshrc) for the path changes to take effect.
FWIW, I've found (on GitHub) the program known as "pyenv" to be invaluable - from a personal perspective. Might be more than what you need/want, but an excellent python management/installer IMHO.
> On Oct 30, 2021, at 05:54, Richard Damon <Richard at damon-family.org> wrote:
>
> Actually, it says I only have 1 'python', but multiple 'python3'
> /usr/bin/python symlinks to a version 2.7 off in /System/Library/Frameworks/
>
> All the versions 3.x only appear as python3 or python3.x
>
> It could well be that they haven't fully removed python2.7 dependencies from the system (or maybe better, haven't validated that they have) so python means python2 for backwards compatibility.
>
>
>> On 10/29/21 11:31 PM, Bryan O'Brien wrote:
>> Likely, you have multiple Python executables on your system.
>> This will necessitate modifying your PATH.
>>
>> In terminal, run:
>>
>> which -a python <enter>
>>
>> If multiple python versions exist (this is normal with MacOS), just ensure that the python you want to use is listed first in your path.
>>
>> grep -i path ~/.zshrc
>>
>> HTH
>>
>>>> On Oct 29, 2021, at 22:00, Richard Damon <Richard at damon-family.org> wrote:
>>>
>>> On 10/29/21 8:08 PM, Cameron Simpson wrote:
>>>>> On 29Oct2021 19:51, Richard Damon <Richard at Damon-Family.org> wrote:
>>>>> On the Mac, 'Python Launcher' seems to just configure how python will
>>>>> run programs run under python. Generally from the Dock, you will want
>>>>> to click on the 'IDLE' icon, which launches the Python IDE, which gives
>>>>> and editor to write python programs or load a python script.
>>>>> The other way to run python is from the command line, using a command
>>>>> like python3 myprog.py
>>>> Also, Macs ship with Python. If your MacOS is current, the supplied
>>>> Python should be pretty modern.
>>>> Cheers,
>>>> Cameron Simpson <cs at cskk.id.au>
>>> You might think that, but my Mac, running the latest version of OS-X, Monterey, reports for a "python --version" that the system default python is still 2.7.10
>>>
>>> Now, this system is a 2019 Year model, but was built as a upgrade to an older system. so that might be a reason.
>>>
>>> Since I have been manually installing current Pythons, I don't know if they also have provided a python3 command with something more recent.
>>>
>>> --
>>> Richard Damon
>>>
>>> _______________________________________________
>>> Tutor maillist - Tutor at python.org
>>> To unsubscribe or change subscription options:
>>> https://mail.python.org/mailman/listinfo/tutor
>> _______________________________________________
>> Tutor maillist - Tutor at python.org
>> To unsubscribe or change subscription options:
>> https://mail.python.org/mailman/listinfo/tutor
>
>
> --
> Richard Damon
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list