gpt4 book ai didi

python - 在 Windows 上的 CygWin 下调用 python 挂起

转载 作者:IT老高 更新时间:2023-10-28 21:52:44 27 4
gpt4 key购买 nike

安装新的Windows系统,我已经安装了CygWin和64在默认位置 (c:\cygwinc:\Python27\python),并添加了 CygWin bin 和Python 目录到我的路径(在用户变量 PATH 中)。从在正常的命令窗口中,Python 可以完美启动,但是当我从 CygWin 环境中的 bash 调用它,它挂起,从不给我输入提示。

我以前在其他机器上做过这个,但总是用旧版本的 Python(32 位)和 CygWin,以及 Python在一个绝对非标准的位置。有没有其他人有这个问题,或者有人可以告诉我这可能是什么原因吗?

最佳答案

试试这个

python -i

是的,你会在这里和那里发现一些小故障!!!

选项 -i 强制交互式提示,如 Python 帮助 python -h 页面所示。​​

$ python -h
-i : inspect interactively after running script;
forces a prompt even if stdin does not appear to be a terminal;
also PYTHONINSPECT=x

关于python - 在 Windows 上的 CygWin 下调用 python 挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13588454/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com