下载好的包安装的报错
E:\software\Anaconda3\pkgs\uiautomator2-master>python setup.py install
E:\software\Anaconda3\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'author-email' will not be supported in future versions. Please use the underscore name 'author_email' instead
warnings.warn(
E:\software\Anaconda3\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
E:\software\Anaconda3\lib\site-packages\setuptools\dist.py:717: UserWarning: Usage of dash-separated 'home-page' will not be supported in future versions. Please use the underscore name 'home_page' instead
warnings.warn(
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pbr/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pbr/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pbr/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pbr/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/pbr/
ERROR: Could not find a version that satisfies the requirement pbr
ERROR: No matching distribution found for pbr
Traceback (most recent call last):
File "E:\software\Anaconda3\lib\site-packages\setuptools\installer.py", line 75, in fetch_build_egg
subprocess.check_call(cmd)
File "E:\software\Anaconda3\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['E:\software\Anaconda3\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\Users\Wayne\AppData\Local\Temp\tmpufde2wad', '--quiet', 'pbr']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "setup.py", line 8, in
setuptools.setup(setup_requires=['pbr'], python_requires='>=3.6', pbr=True)
File "E:\software\Anaconda3\lib\site-packages\setuptools_init.py", line 152, in setup
install_setup_requires(attrs)
File "E:\software\Anaconda3\lib\site-packages\setuptools_init.py", line 147, in install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "E:\software\Anaconda3\lib\site-packages\setuptools\dist.py", line 806, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "E:\software\Anaconda3\lib\site-packages\pkg_resources_init.py", line 766, in resolve
dist = best[req.key] = env.best_match(
File "E:\software\Anaconda3\lib\site-packages\pkg_resources_init.py", line 1051, in best_match
return self.obtain(req, installer)
File "E:\software\Anaconda3\lib\site-packages\pkg_resources_init_.py", line 1063, in obtain
return installer(requirement)
File "E:\software\Anaconda3\lib\site-packages\setuptools\dist.py", line 877, in fetch_build_egg
return fetch_build_egg(self, req)
File "E:\software\Anaconda3\lib\site-packages\setuptools\installer.py", line 77, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['E:\software\Anaconda3\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\Users\Wayne\AppData\Local\Temp\tmpufde2wad', '--quiet', 'pbr']' returned non-zero exit status 1.
使用pip安装报错:
(tensorflow36) C:\Users\Wayne>pip3 install -U uiautomator2
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.', OSError(0, 'Error'))': /simple/uiautomator2/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/uiautomator2/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/uiautomator2/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/uiautomator2/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/uiautomator2/
ERROR: Could not find a version that satisfies the requirement uiautomator2
ERROR: No matching distribution found for uiautomator2
下载二进制文件包然后下载试试