python - git bash 无法读取我的 python 文件已经尝试过类似问题下的方法
问题描述
我的 python 文件的位置在我的电脑中 -User -App data - Roaming -Microsoft-Windows-Start Menu-Python 3.8.
我通过添加"C:\Python38"
到系统变量下的路径来尝试该方法。但是当我输入时python --version
,它会返回bash: python no command found
;我还尝试输入“Git bash 不会运行我的 python 文件”问题的答案中推荐的 Path 命令,但仍然没有。如果有帮助,我会使用在 Mac 上下载的 Windows 系统。
解决方案
在 git bash 中使用别名
alias python='/c/Python3.8/...'
然后关闭并重新打开 bash 窗口,它应该可以工作。
推荐阅读
- python - 为什么绘图函数 plt.show() 在循环内部或外部表现不同?
- python - Python 请求库 - 从 POST 请求中抓取单独的 JSON 和 HTML 响应
- javascript - 如何在 For/In 循环中解析 Int,然后添加一个类来更改 CSS 中的字体颜色?
- c - 奇怪的内存问题,for 循环初始化不正确并修改堆内存
- sas - SAS PROC TRANSPOSE(“从宽到长”)
- powershell - PowerShell 命令仅适用于参数之间没有空格的情况
- angular - Nexted 在 rxjs 中订阅
- python - 如何从列表中更改图形标题的输出?
- java - NoSuchElementException:找不到行。?
- python - 播放器比相机蟒更快