I need to install Selenium in a Windows machine that does not have connection to the internet. I have donwloaded the.whl distribution file from this link: https://pypi.org/project/selenium/#files and used py -m pip install selenium.whl
command, but it still asked connection to the internet. Here's the error screenshot
Any help would be much appreciated.
This is most likely because selenium has several dependencies, one of which is trio. If you try to install selenium on your offline machine it will try to look for the dependencies online. This the reason for you error.
So, you have to install the dependencies as well, otherwise selenium will not work.
The way to do this is described in the following post: installing python packages without internet and using source code as.tar.gz and.whl
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.