Я настраиваю python среду на Ма c (Каталина). Я установил python3 и хотел запустить его с терминала, набрав "python".
epipko@Eugenes-Mac ~ % python
Python 2.7.16 (default, Dec 13 2019, 18:00:32)
[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.32.4) (-macos10.15-objc-s on darwin
Type "help", "copyright", "credits" or "license" for more information.
epipko@Eugenes-Mac ~ % python3
Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Я хотел настроить псевдоним для "python", чтобы открыть python3, но .bash_profile там не было. Я создал его и добавил псевдоним, но мой псевдоним не работает
epipko@Eugenes-Mac ~ % ls -altr .bash_profile
ls: .bash_profile: No such file or directory
epipko@Eugenes-Mac ~ % touch .bash_profile
epipko@Eugenes-Mac ~ % chmod 700 .bash_profile
epipko@Eugenes-Mac ~ % ls -altr .bash_profile
-rwx------ 1 epipko staff 21 Apr 5 09:44 .bash_profile
epipko@Eugenes-Mac ~ % cat .bash_profile
alias python=python3
Кроме того, поскольку python был установлен до того, как был создан .bash_profile, мне не хватает содержания python Speci c в .bash_profile? Нужно ли переустанавливать python?