无法在 cygwin 环境中执行 aws configure 没有这样的文件或目录错误

unable to do aws configure in cygwin environment no such file or directory error

由于硬件限制,我无法使用 Windows 7。这是我完成所有作业的唯一机器。我安装了 cygwin 广告,想使用 awscli。

我浏览了这里的文章 How to get AWS command line interface to work in cygwin from I read things here http://wiki.fast.ai/index.php/Awscli_in_cygwin 上面提到的一个答案我试过了

pip uninstall awscli
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
apt-cyg install python
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install awscli

当我做

$ aws --version
aws-cli/1.15.81 Python/2.7.14 CYGWIN_NT-6.1/2.10.0(0.325/5/3) botocore/1.10.80

现在当我执行 aws configure 时出现错误

DEEL@DEEL-PC ~/.aws
$ aws configure
AWS Access Key ID [****************NLVA]:
AWS Secret Access Key [****************2YhC]:
Default region name [None]: ap-south-1
Default output format [None]: text

[Errno 2] No such file or directory: ''

它在抱怨什么,我该如何摆脱它? 当我做

$ cat config
[default]
output = text
region = ap-south-1

我之前曾尝试设置东西并进行了这些输入。 现在当我 运行

$ aws ec2 describe-instances
You must specify a region. You can also configure your region by running "aws configure".

当我 运行 aws configure

DEEL@DEEL-PC ~/.aws
$ aws configure
AWS Access Key ID [****************NLVA]:
AWS Secret Access Key [****************2YhC]:
Default region name [None]: ap-south-1
Default output format [None]: text

[Errno 2] No such file or directory: ''

我也检查了 No such file or directory error when configuring aws on cygwin 但无法解决问题。

现在我做到了

$ rm -rfv .aws/
removed '.aws/credentials'
removed directory '.aws/'

再一次

DEEL@DEEL-PC ~ $ aws configure 
AWS Access Key ID [None]: ****************VA 
AWS Secret Access Key [None]: *************hC 
Default region name [None]: ap-south-1 
Default output format [None]: text
[Errno 2] No such file or directory: ''

但我又遇到同样的错误。 现在这是一个问题,我还应该在这里检查什么才能让 awscli 在 cygwin 中工作?

我发布这个答案以供将来参考

1) 从 cygwin 安装程序安装 python3-pip,它直接从 cygwin 安装所有依赖项。 (但是原来的问题并没有单独解决我不得不去第2步)
2)基于建议here
在 windows 7 中以管理员身份启动 cygwin(这对我来说直接解决了问题)
3) 删除了根据建议 here

定义的环境变量 AWS_CONFIG_FILE

4) hash -d aws(清除缓存)

一切顺利。我现在可以在 cygwin 中使用 aws 命令。 可以启动 amazon ec2 实例并在命令行启动和停止它。 然而,欢迎任何 suggestion/answer 进一步了解这里可能出了什么问题。