python-3.x 为什么undetected_chromedriver模块不工作?(“没有名为'undetected_chromedriver'的模块”)

rt4zxlrg  于 2023-03-04  发布在  Python
关注(0)|答案(1)|浏览(641)

在Debian 11上。在pip和pip3软件包列表中我可以看到它。但是当我试图运行测试脚本时,我得到错误:
root@debian-s-1vcpu-1gb-amd-nyc3 - 01:~# python3 www.example.com追溯(最近调用的最后一个):chromedriver.py没有名为"undetected_chromedriver"的模块 File "/root/chromedriver.py", line 1, in import undetected_chromedriver.v2 as uc ModuleNotFoundError: No module named 'undetected_chromedriver'

root@debian-s-1vcpu-1gb-amd-nyc3-01:~# pip3 list
Package                 Version
----------------------- ---------------
async-generator         1.10
attrs                   22.2.0
certifi                 2022.12.7
cffi                    1.15.1
charset-normalizer      3.0.1
chromedriver            2.24.1
chromedriver-binary     111.0.5563.41.0
exceptiongroup          1.1.0
ffmpeg                  1.4
h11                     0.14.0
idna                    3.4
lxml                    4.9.2
numpy                   1.24.2
outcome                 1.2.0
pandas                  1.5.3
pip                     23.0.1
pocketsphinx            5.0.0
pycparser               2.21
pydub                   0.25.1
PyPasser                0.0.5
PySocks                 1.7.1
python-dateutil         2.8.2
pytz                    2022.7.1
PyVirtualDisplay        3.0
requests                2.28.2
selenium                4.8.2
setuptools              67.4.0
six                     1.16.0
sniffio                 1.3.0
sortedcontainers        2.4.0
sounddevice             0.4.6
SpeechRecognition       3.9.0
trio                    0.22.0
trio-websocket          0.9.2
undetected-chromedriver 3.4.6
urllib3                 1.26.14
websockets              10.4
wsproto                 1.2.0

root@debian-s-1vcpu-1gb-amd-nyc3-01:~# pip list
Package                 Version
----------------------- ---------------
async-generator         1.10
attrs                   22.2.0
certifi                 2022.12.7
cffi                    1.15.1
charset-normalizer      3.0.1
chromedriver            2.24.1
chromedriver-binary     111.0.5563.41.0
exceptiongroup          1.1.0
ffmpeg                  1.4
h11                     0.14.0
idna                    3.4
lxml                    4.9.2
numpy                   1.24.2
outcome                 1.2.0
pandas                  1.5.3
pip                     23.0.1
pocketsphinx            5.0.0
pycparser               2.21
pydub                   0.25.1
PyPasser                0.0.5
PySocks                 1.7.1
python-dateutil         2.8.2
pytz                    2022.7.1
PyVirtualDisplay        3.0
requests                2.28.2
selenium                4.8.2
setuptools              67.4.0
six                     1.16.0
sniffio                 1.3.0
sortedcontainers        2.4.0
sounddevice             0.4.6
SpeechRecognition       3.9.0
trio                    0.22.0
trio-websocket          0.9.2
undetected-chromedriver 3.4.6
urllib3                 1.26.14
websockets              10.4
wsproto                 1.2.0

你能帮我解决这个问题吗?
我试图在debian上安装udetected_chromedriver,但出现错误。我的代码:Python 3网站chromedriver.py
从www.example.com导入undetected_chromedriver.v2作为uc从selenium.webdriver.common.keys导入通过导入密钥selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys

cnjp1d6j

cnjp1d6j1#

试试这个

import undetected_chromedriver as uc

相关问题