【pip install selenium】pip ValueError: check_hostname requires server_hostname

news/2024/11/24 2:14:56/

  • 关闭windows上的全局代理

pip install selenium

C:\Users\zhangbin> pip install selenium
Defaulting to user installation because normal site-packages is not writeable
ERROR: Exception:
Traceback (most recent call last):File "C:\Program Files\Python310\lib\site-packages\pip\_internal\cli\base_command.py", line 173, in _mainstatus = self.run(options, args)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\cli\req_command.py", line 203, in wrapperreturn func(self, options, args)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\commands\install.py", line 315, in runrequirement_set = resolver.resolve(File "C:\Program Files\Python310\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 94, in resolveresult = self._result = resolver.resolve(File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 472, in resolvestate = resolution.resolve(requirements, max_rounds=max_rounds)File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 341, in resolveself._add_to_criteria(self.state.criteria, r, parent=None)File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteriaif not criterion.candidates:File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 151, in __bool__return bool(self._sequence)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 140, in __bool__return any(self)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 128, in <genexpr>return (c for c in iterator if id(c) not in self._incompatible_ids)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 29, in _iter_builtfor version, func in infos:File "C:\Program Files\Python310\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 272, in iter_index_candidate_infosresult = self._finder.find_best_candidate(File "C:\Program Files\Python310\lib\site-packages\pip\_internal\index\package_finder.py", line 851, in find_best_candidatecandidates = self.find_all_candidates(project_name)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\index\package_finder.py", line 798, in find_all_candidatespage_candidates = list(page_candidates_it)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\index\sources.py", line 134, in page_candidatesyield from self._candidates_from_page(self._link)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\index\package_finder.py", line 758, in process_project_urlhtml_page = self._link_collector.fetch_page(project_url)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\index\collector.py", line 490, in fetch_pagereturn _get_html_page(location, session=self.session)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\index\collector.py", line 400, in _get_html_pageresp = _get_html_response(url, session=session)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\index\collector.py", line 115, in _get_html_responseresp = session.get(File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\requests\sessions.py", line 555, in getreturn self.request('GET', url, **kwargs)File "C:\Program Files\Python310\lib\site-packages\pip\_internal\network\session.py", line 454, in requestreturn super().request(method, url, *args, **kwargs)File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\requests\sessions.py", line 542, in requestresp = self.send(prep, **send_kwargs)File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\requests\sessions.py", line 655, in sendr = adapter.send(request, **kwargs)File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 53, in sendresp = super(CacheControlAdapter, self).send(request, **kw)File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\requests\adapters.py", line 439, in sendresp = conn.urlopen(File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 696, in urlopenself._prepare_proxy(conn)File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 964, in _prepare_proxyconn.connect()File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\urllib3\connection.py", line 359, in connectconn = self._connect_tls_proxy(hostname, conn)File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\urllib3\connection.py", line 500, in _connect_tls_proxyreturn ssl_wrap_socket(File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py", line 453, in ssl_wrap_socketssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)File "C:\Program Files\Python310\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_implreturn ssl_context.wrap_socket(sock)File "C:\Program Files\Python310\lib\ssl.py", line 512, in wrap_socketreturn self.sslsocket_class._create(File "C:\Program Files\Python310\lib\ssl.py", line 1027, in _createraise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname

pip install selenium


C:\Users\zhangbin> pip install selenium
Defaulting to user installation because normal site-packages is not writeable
Collecting seleniumDownloading selenium-4.1.0-py3-none-any.whl (958 kB)|████████████████████████████████| 958 kB 26 kB/s
Collecting urllib3[secure]~=1.26Downloading urllib3-1.26.8-py2.py3-none-any.whl (138 kB)|████████████████████████████████| 138 kB 32 kB/s
Collecting trio-websocket~=0.9Downloading trio_websocket-0.9.2-py3-none-any.whl (16 kB)
Collecting trio~=0.17Downloading trio-0.19.0-py3-none-any.whl (356 kB)|████████████████████████████████| 356 kB 53 kB/s
Collecting attrs>=19.2.0Downloading attrs-21.4.0-py2.py3-none-any.whl (60 kB)|████████████████████████████████| 60 kB 80 kB/s
Collecting cffi>=1.14Downloading cffi-1.15.0-cp310-cp310-win_amd64.whl (180 kB)|████████████████████████████████| 180 kB 53 kB/s
Collecting sortedcontainersDownloading sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting sniffioDownloading sniffio-1.2.0-py3-none-any.whl (10 kB)
Collecting outcomeDownloading outcome-1.1.0-py2.py3-none-any.whl (9.7 kB)
Collecting async-generator>=1.9Downloading async_generator-1.10-py3-none-any.whl (18 kB)
Collecting idnaDownloading idna-3.3-py3-none-any.whl (61 kB)|████████████████████████████████| 61 kB 28 kB/s
Collecting pycparserDownloading pycparser-2.21-py2.py3-none-any.whl (118 kB)|████████████████████████████████| 118 kB 20 kB/s
Collecting wsproto>=0.14Downloading wsproto-1.0.0-py3-none-any.whl (24 kB)
Collecting pyOpenSSL>=0.14Downloading pyOpenSSL-22.0.0-py2.py3-none-any.whl (55 kB)|████████████████████████████████| 55 kB 17 kB/s
Collecting certifiDownloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)|████████████████████████████████| 149 kB 23 kB/s
Collecting cryptography>=1.3.4Downloading cryptography-36.0.1-cp36-abi3-win_amd64.whl (2.2 MB)|████████████████████████████████| 2.2 MB 29 kB/s
Collecting h11<1,>=0.9.0Downloading h11-0.13.0-py3-none-any.whl (58 kB)|████████████████████████████████| 58 kB 56 kB/s
Installing collected packages: pycparser, cffi, attrs, sortedcontainers, sniffio, outcome, idna, h11, cryptography, async-generator, wsproto, urllib3, trio, pyOpenSSL, certifi, trio-websocket, selenium
Successfully installed async-generator-1.10 attrs-21.4.0 certifi-2021.10.8 cffi-1.15.0 cryptography-36.0.1 h11-0.13.0 idna-3.3 outcome-1.1.0 pyOpenSSL-22.0.0 pycparser-2.21 selenium-4.1.0 sniffio-1.2.0 sortedcontainers-2.4.0 trio-0.19.0 trio-websocket-0.9.2 urllib3-1.26.8 wsproto-1.0.0
WARNING: You are using pip version 21.2.4; however, version 22.0.3 is available.
You should consider upgrading via the 'C:\Program Files\Python310\python.exe -m pip install --upgrade pip' command.

升级pip:python -m pip install --upgrade pip

C:\Users\zhangbin>C:\Program Files\Python310\python.exe -m pip install --upgrade pip
'C:\Program' 不是内部或外部命令,也不是可运行的程序
或批处理文件。C:\Users\zhangbin>python -m pip install --upgrade pip
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in c:\program files\python310\lib\site-packages (21.2.4)
Collecting pipDownloading pip-22.0.3-py3-none-any.whl (2.1 MB)|████████████████████████████████| 2.1 MB 48 kB/s
Installing collected packages: pipWARNING: The scripts pip.exe, pip3.10.exe and pip3.exe are installed in 'C:\Users\zhangbin\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-22.0.3
WARNING: You are using pip version 21.2.4; however, version 22.0.3 is available.
You should consider upgrading via the 'C:\Program Files\Python310\python.exe -m pip install --upgrade pip' command.C:\Users\zhangbin>

http://www.ppmy.cn/news/561768.html

相关文章

Android查看app内存和cpu占用

1.可以使用adb shell showmap pid查看一个进程的showmap&#xff0c;这对于我们来说非常有用&#xff0c;可以确定进程中哪些库占用内存比较多 1,确定app进程号,通过jarvis过滤,ps-A显示全部进程 ps命令使用 cmd通过adb shell进入与移动设备的命令交互界面。 然后使用ps指令&…

R语言:B-M中位数检验和WMW检验

文章目录 B-W检验WMW检验Mood方差检验Moses方差检验 B-W检验 Brown-Mood检验与符号检验的思想类似&#xff0c;仅比较了两组数据的符号&#xff1b;类似于单样本的Wilcoxon符号秩检验&#xff0c;利用更多信息构造检验 BM.test<-function(x,y,alttwo.sided) {xy<-c(x…

DL之GRU:基于2022年6月最新上证指数数据集结合Pytorch框架利用GRU算法预测最新股票上证指数实现回归预测

DL之GRU&#xff1a;基于2022年6月最新上证指数数据集结合Pytorch框架利用GRU算法预测最新股票上证指数实现回归预测 目录 基于2022年6月最新上证指数数据集结合Pytorch框架利用GRU算法预测最新股票上证指数实现回归预测 # 0、数据集预整理 # 1、读取数据集 # 2、数据预处理…

k8s安装metric server和了解namespace【命名空间】,含k8s pod状态为ImagePullBackOff处理方法

文章目录 说明metrics server镜像和包下载并上传到服务器镜像解压【每一个节点】软件包安装【master节点】配置文件修改应用修改配置配置文件重命名metrics服务状态查看 测试查看node及pod监控指标top精简查看top中使用率m说明top报错error处理 namespace【命名空间】说明查看所…

n个元素中取m个元素的组合、排列问题

n个元素中取m个元素的组合 如A{1,2,3}则有这些组合&#xff1a;1,2,3,12,13,23,123; 我们可以把问题分解如下&#xff1a; 1&#xff09;求数组中由1到n个元素的组合f(n,m) (m>1 && m<n;n为数组元素个数)&#xff1b; 2&#xff09;对于f(n,m)&#xff0c;我们从…

阵列卡直通模式和raid模式_linux入门系列13--磁盘管理之RAID、LVM技术

前一篇文章学习了磁盘分区、格式化、挂载等相关知识,本文将讲解RAID和LVM技术。 磁盘管理操作主要是运维人员用的较多,如果只是单纯的开发人员,可以先略过本文。但是在很多小公司里往往都是一人多用,运维、开发通常都是同一个人,因此对个人的技能要求更高。即便不是如此,…

字典序排列之后, 求其中的第m个数

题目描述 给定整数n和m, 将1到n的这n个整数按字典序排列之后, 求其中的第m个数。 对于n11, m4, 按字典序排列依次为1, 10, 11, 2, 3, 4, 5, 6, 7, 8, 9, 因此第4个数是2. 对于n200, m25, 按字典序排列依次为1 10 100 101 102 103 104 105 106 107 108 109 11 110 111 112 113 …

Container exited with a non-zero exit code 134错误原因查找

问题&#xff1a;spark在yarn执行任务遇到如下的错误&#xff1a; 19/12/03 17:19:50 ERROR YarnScheduler: Lost executor 8 on hd060.corp.yodao.com: Container marked as failed: container_e84_1574035425015_31355_01_000009 on host: hd060.corp.yodao.com. Exit statu…