简体   繁体   English

无法通过命令提示符安装 Selenium WebDriver

[英]Unable to install Selenium WebDriver through command prompt

When I try to install Selenium WebDriver on cmd prompt using command "python setup.py install" I am getting error "The program can't start because api-ms-win-crt-runtime-Il-1-0.dll missing from your computer".当我尝试使用命令“python setup.py install”在 cmd 提示符下安装 Selenium WebDriver 时,出现错误“程序无法启动,因为缺少 api-ms-win-crt-runtime-Il-1-0.dll你的电脑”。 I am using Python version-3.7 and I have set the path of the Python in environment variable.我使用的是 Python 3.7 版,并且在环境变量中设置了 Python 的路径。 Please help me how to solve this issue, I am new to Python.请帮助我如何解决这个问题,我是 Python 新手。

Download get-pip.py to a directory in your computer.get-pip.py下载到您计算机中的目录。

Then run然后运行

python get-pip.py

Then do然后做

pip install -U selenium

Then use this in your code:然后在您的代码中使用它:

from selenium import webdriver

如果您的计算机中已经安装了 Python,那么您只需执行以下操作:

pip install selenium

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM