python语句执行不了

简介: 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. 醉了,都重启了

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

如下图:

小结

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

相关文章
|
1月前
|
Python
python中if语句(一)
python中if语句(一)
33 0
|
1月前
|
Python
python中if语句(二)
python中if语句(二)
28 0
|
1月前
|
Python
Python if语句
Python if语句
|
1月前
|
C语言 索引 Python
python语句
python语句
【Python入门】Python的判断语句(if else 语句)
【Python入门】Python的判断语句(if else 语句)
|
Python
Python for...else... 语句
Python for...else... 语句
|
Python
python(7)--if语句
python(7)--if语句
69 0
python(7)--if语句
|
Python
Python中的While 语句
Python中的While 语句自制脑图
79 0
Python中的While 语句
|
Python
Python—常用语句
判断语句 循环语句 break语句和continue语句
Python—常用语句
|
存储 数据库 Python
Python - with 语句
Python - with 语句
99 0