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

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

如下图:

小结

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

相关文章
|
7月前
|
Python
python中if语句(一)
python中if语句(一)
78 0
|
7月前
|
Python
python中if语句(二)
python中if语句(二)
58 0
|
7月前
|
Python
Python if语句
Python if语句
|
7月前
|
C语言 索引 Python
python语句
python语句
|
7月前
|
Python
Python判断语句(二)
Python判断语句(二)
35 0
Python判断语句(二)
|
7月前
|
Python
第3章:python的判断语句
第3章:python的判断语句
|
7月前
|
Python
python中if语句(三)
python中if语句(三)
57 0
|
7月前
|
Python
Python 条件和 if 语句
Python支持来自数学的通常逻辑条件:
75 0
【Python入门】Python的判断语句(if else 语句)
【Python入门】Python的判断语句(if else 语句)
|
Python
Python for...else... 语句
Python for...else... 语句