1.pip 安装超时
解决办法 换成国内的pip源就可以了
方法:C:\Users\luo 打开系统盘,用户 , 具体用户,建立文件夹‘pip',在文件夹中创建文件 pip.ini,文件中插入代码段。
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
2.多试试
大多数问题都不是我们自己的问题,多试试就可以了,一样的代码一样的操作,不一样的结果。第一次失败了,第二次就成功了。
C:\Users\luo>pip install --pre uiautomator2
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting uiautomator2
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/4d/71/3b04a5f292c2f987059580e1d86a8ffb338d5d507ffb7b1fdd094eba0a84/uiautomator2-0.1.5.tar.gz
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/pbr/: [WinError 10054] 远程主机强迫关闭了一个现有的连接。 -- Some packages may not be found!
Couldn't find index page for 'pbr' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [WinError 10054] 远程主机强迫关闭了一个现有的连接。 -- Some packages may not be found!
No local packages or working download links found for pbr
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\luo\AppData\Local\Temp\pip-install-jb06oq15\uiautomator2\setup.py", line 9, in <module>
setup_requires=['pbr'], python_requires='>=2.7,!=3.8.*', pbr=True)
File "c:\users\luo\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "c:\users\luo\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\__init__.py", line 123, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\luo\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\dist.py", line 513, in fetch_build_eggs
replace_conflicting=True,
File "c:\users\luo\appdata\local\programs\python\python37-32\lib\site-packages\pkg_resources\__init__.py", line 774, in resolve
replace_conflicting=replace_conflicting