问题
执行命令
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
解决方案
- 网上搜了下,换了个清华源,然后还是不行;
- 又换了一个阿里源,还是不行;
- 醉了,都重启了
就差换回默认了,还好还清醒,然后发现开了梯子;就把它关了,然后就正常了。
如下图:
小结
要学会逆向思考啊,全面思考问题,这都耽误了我好几分钟呢!哈哈哈,好了,解决。继续。