Vous venez toute juste fraichement télécharger et installer le PKG python3, quand vous écrivez dans le terminal.
Le c'est de ne pas installé par des tiers doivent obligatoirement avoir xcode avec MacPort, flink et encore homebrew, une installation propre.
MacPuce-M1$: python --version #S'affiche 2.7.16 (qui est obsolète)
Oui sur la puce M1 par défaut c'est bien du python 2.7.16
Comment régler ce problème:
1) MacPuce-M1$: pkgutil --pkgs | grep org.python.Python | xargs -L1 pkgutil -f --unlink #non
2) # non c'est pas la solution mais vous pourrez toujours essayé
MacPuce-M1$: sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
MacPuce-M1$: sudo m -rf "/Applications/Python 2.7"
MacPuce-M1$: sudo ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7'
MacPuce-M1$: cd /usr/local/bin/
MacPuce-M1$: sudo ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm
3) # vérifier si indique language python 3.x
MacPuce-M1$: cd /usr/local/bin/
MacPuce-M1$: ls
MacPuce-M1$: echo $PATH
4) # 2 Solution Possible:
La 4-1)
MacPuce-M1$: nano ~/.bash_profile # ajouter ceci alias python="/usr/local/bin/python3"
MacPuce-M1$: source ~/.bash_profile
MacPuce-M1$: crontab -e # ajouter ceci @reboot source ~/.bash_profile
La 4-2)
MacPuce-M1$: sudo ln -s -f /usr/local/bin/python3.9 /usr/local/bin/python
MacPuce-M1$: python --version # régler 3.9.x
Version 3.9.2 universal - n'oubliez pas de faire en supplément ceci:
MacPuce-M1$: /Applications/Python\ 3.9/Install\ Certificates.command
MacPuce-M1$: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m pip install --upgrade pip
MacPuce-M1$: /Applications/Python\ 3.9/Update\ Shell\ Profile.command # si besoin update
Bon code et à vous de jouez les développeur sur python
0 Commentaires