天天看点

PyCharm运行bash脚本

因python代码用bash去执行,而本机是windows操作系统,因此需要在本机的pycharm上进行调试,运行bash则是一个需要解决的问题。

首先需要准备git工具

下载地址:​​https://git-scm.com/download/win​​

在pycharm中进行配置

File -> Settings -> Tools -> Terminal -> Applications Settings -> Shell Path(选择bash解释器的位置)

我的git安装在​

​D:\Program Files\Git\bin\bash.exe​

如图:

PyCharm运行bash脚本

重启pycharm即可

如图,可以愉快在pycharm中使用bash命令了

PyCharm运行bash脚本