Help! I broke python 3.9 installation on macOS

Elliott Roper nospam at yrl.co.uk
Thu Oct 8 19:31:20 EDT 2020


First problem: I can no longer say
Obfuscated at MyMac ~ % python3 pip -m list

It cries in pain with:

/Library/Frameworks/Python.framework/Versions/3.9/bin/python3: can't open file
'/Users/Obfuscated/pip': [Errno 2] No such file or directory.
Why is it looking at my $HOME??

Here's some hopefully relevant outputs:

First, this to show terminal has picked up $PATH from .zprofile and runs
python 3.9.0

Obfuscated at MyMac ~ % python3
Python 3.9.0 (v3.9.0:9cf6752276, Oct  5 2020, 11:29:23) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D

however, typing various flavours of pip commands direct into the shell gives
me this:-

Obfuscated at MyMac ~ % pip3 list
Package    Version
---------- -------
pip        20.2.3
setuptools 49.2.1

and


Obfuscated at MyMac ~ % pip3.8 list
Package         Version
--------------- ---------
certifi         2020.6.20
cycler          0.10.0
kiwisolver      1.2.0
matplotlib      3.3.2
numexpr         2.7.1
numpy           1.19.2
pandas          1.1.2
Pillow          7.2.0
pip             20.2.3
pyparsing       2.4.7
python-dateutil 2.8.1
pytz            2020.1
scipy           1.5.2
setuptools      49.2.1
six             1.15.0
wheel           0.35.1
Obfuscated at MyMac ~ %

Something has gone wrong with site.py probably unable to fall back to using
the older site-packages because of my $PATH abuse.

which now reads as

echo $PATH
/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Pyt
hon.framework/Versions/3.8/bin:/Users/Obfuscated/bin:/usr/local/bin:/usr/bin:
/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/MacGPG2/bin:/Library/Appl
e/usr/bin

I tried installing the packages into 3.9 one at a time but got errors
indicating that it was trying to re-compile modules like pandas from source. I
saw a reply to a windows user on this list today who was advised to be patient
because 3.9 might be too new to have all the binary modules in PyPi

I scrubbed all of 3.9 from
/Library/Frameworks/Python.framework/Versions/
and re-installed python 3.9 from Python.org to get back to the same situation
described above.

I have tried to work out what was wrong by reading site.py but got lost.

Am I facing a ruthless deletion of every trace of Python and starting again,
or waiting patiently for the binary modules to appear (3.8 still works OK, so
I can live with that)??

Or is there some piece of obvious magic I have missed blundering in the land
of the Sorcerer's Apprentice?

Thanks
-- 
To de-mung my e-mail address:- fsnospam$elliott$$
PGP Fingerprint: 1A96 3CF7 637F 896B C810  E199 7E5C A9E4 8E59 E248




More information about the Python-list mailing list