在Win 上直接从Git Bash运行Python(Python 2.7和Python 3.x)的最佳解决方案:将别名添加到Git Bash用于的别名文件中。
Git Bash别名文件是aliases.sh。 它位于Git的安装路径上:
C:\Program Files\Git\etc\profile.d
两个版本的python安装位置分别问:
C:\Users\wangchen\AppData\Local\Programs\Python\Python37
D:\Anaconda3

在aliases.sh最上两行 加上
alias python3.7=‘winpty C:/Users/wangchen/AppData/Local/Programs/Python/Python37/python.exe’
alias python3.6=‘winpty D:/Anaconda3/python.exe’
Git bash如何调用不同版本的python然后在Git Bash上直接调用
Git bash如何调用不同版本的python

相关文章:

  • 2021-08-01
  • 2022-03-03
  • 2021-11-01
  • 2021-10-11
  • 2022-01-23
  • 2021-09-23
  • 2021-09-16
  • 2022-12-23
猜你喜欢
  • 2021-04-15
  • 2023-02-22
  • 2022-03-09
  • 2021-09-01
  • 2021-10-14
  • 2021-07-14
相关资源
相似解决方案