He instalado Python3 a través de brew
:
brew install python@3.9
Y siguiendo la cadena de enlaces simbólicos de which python3
conduce a:
$ which python3
/usr/local/bin/python3
$ ls -l /usr/local/bin/python3
lrwxr-xr-x 1 user admin 41 27 Jul 17:44 /usr/local/bin/python3 -> ../Cellar/python@3.9/3.9.13_1/bin/python3
$ ls -l /usr/local/Cellar/python\@3.9/3.9.13_1/bin/python3
lrwxr-xr-x 1 user staff 55 23 Jul 08:45 /usr/local/Cellar/python@3.9/3.9.13_1/bin/python3 -> ../Frameworks/Python.framework/Versions/3.9/bin/python3
$ ls -l /usr/local/Cellar/python\@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/bin/python3
lrwxr-xr-x 1 user staff 9 23 Jul 08:44 /usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/bin/python3 -> python3.9
$ ls -l /usr/local/Cellar/python\@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/bin/python3.9
-rwxr-xr-x 1 user staff 13620 23 Jul 08:42 /usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/bin/python3.9
También instalé offlineimap
con:
python3 -m pip install offlineimap
Y la línea del shebang se muestra:
#!/usr/local/opt/python@3.9/bin/python3.9
que apunta a un binario diferente:
$ ls -l /usr/local/opt/python@3.9/bin/python3.9
lrwxr-xr-x 1 user staff 57 23 Jul 08:45 /usr/local/opt/python@3.9/bin/python3.9 -> ../Frameworks/Python.framework/Versions/3.9/bin/python3.9
$ ls -l /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/bin/python3.9
-rwxr-xr-x 1 user staff 13620 23 Jul 08:42 /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/bin/python3.9
y los dos tienen las mismas versiones:
$ python3 --version
Python 3.9.13
$ /usr/local/opt/python@3.9/bin/python3.9 --version
Python 3.9.13
¿Cómo he podido instalar dos instancias del mismo Python? ¿Cómo puedo desinstalar la versión que no es de cerveza?