作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Python 不会在 git bash (Windows) 中运行。当我在命令行中输入 python 时,它会将我带到一个空行,而不会像在 Powershell 中一样显示它已输入 python 3.9.1。它没有给我错误消息,但 python 就是不运行。
这就是我输入 python 时发生的情况。它只是卡住了。关于如何修复它的任何想法。我无法使用命令提示符,因为当我导入显示 ModuleNotFound 的模块时,它会导致一些错误。
Selvi@DESKTOP-H75HFL5 MINGW64 /
$ python
2*2
最佳答案
要在 git bash 中运行 python,您只需输入 winpty python
或使用 python -i
注意:如果您使用 winpty python
,您可以使用 CTRL + Z
或 exit()
退出 python,但如果您使用 >python -i
,只能使用exit()
退出。
关于python - 如何在 git bash 上使用 python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66625517/
我是一名优秀的程序员,十分优秀!