首页 > 解决方案 > 无法在 cygwin 中使用 python 2.7

问题描述

我正在尝试将 python 2.7 与我的 Cygwin 终端一起使用。我不擅长 Cygwin/安装包,但这是我迄今为止尝试过的。

我重新运行了 Cygwin 安装程序并选择了 python27 包,但这似乎不起作用。我已经从 python 网站下载并安装了 python 2.7。

运行任何 python 命令都会让我得到“-bash: python: command not found”

运行 python3 --version 让我得到“Python 3.6.10”

任何帮助将不胜感激。谢谢!

标签: pythonpython-2.7cygwin

解决方案


也安装python2

它包括所需的链接:

python2: Python 2 language interpreter

2020-05-23 09:41           0 usr/bin/pydoc -> pydoc2.7
2020-05-23 09:41           0 usr/bin/pydoc2 -> pydoc2.7
2020-05-23 09:41           0 usr/bin/python -> python2.7.exe
2020-05-23 09:41           0 usr/bin/python2 -> python2.7.exe
2020-05-23 09:42          45 usr/share/man/man1/python.1.gz
2020-05-23 09:42          46 usr/share/man/man1/python2.1.gz

如上所述: https ://cygwin.com/packages/x86/python2/python2-2.7.18-1


推荐阅读