python语句执行不了

问题

执行命令

 python install -r .\requirements.txt

出现问题如下:

D:\soft\Python310\python.exe: can't open file 'G:\\Area\\C++\\Fay\\install': [Errno 2] No such file or directory
(.venv) PS G:\Area\C++\Fay> pip install -r .\requirements.txt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory'))': /simple/requests/   
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory'))': /simple/requests/   
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory'))': /simple/requests/   
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory'))': /simple/requests/   
ERROR: Could not find a version that satisfies the requirement requests (from versions: none)
ERROR: No matching distribution found for requests

解决方案

  1. 网上搜了下,换了个清华源,然后还是不行;
  2. 又换了一个阿里源,还是不行;
  3. 醉了,都重启了

就差换回默认了,还好还清醒,然后发现开了梯子;就把它关了,然后就正常了。

如下图:
在这里插入图片描述

小结

要学会逆向思考啊,全面思考问题,这都耽误了我好几分钟呢!哈哈哈,好了,解决。继续。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值