warninr : pip is configured with locations that require TLS/ssl ,howeber the ssl module in python is not available
什麼叫坑爹 這就是坑爹
Anaconda我安裝selenium的時候報錯,非常坑爹研究了一晚上,希望寫下來給我下次排一下坑,能幫到別人也是好的
我的解決方法
在環境變量path裏面加上E:\Anaconda\Library\bin這個文件路徑
E:\Anaconda 是我的Anaconda的安裝路徑
##以下是selenium安裝教程:
安裝環境:windows7 Anaconda Python3 Chrome
1.selenium可以直接可以用pip安裝。
打開cmd
pip install selenium
或者手動下載包之後,解壓後在文件內Ctrl+shirft
輸入: pip install selenium
包的下載地址很多 我不確定那些以後還能不能用 附一個官方下載地址(不太好用)
https://selenium.dev
檢測是否成功
from selenium import webdriver
2.chromedriver安裝
首先確定谷歌瀏覽器的版本 瀏覽器右上角–>幫助–>關於谷歌 可查版本號
然後下載對應的chromedriver
下載地址有兩個下載地址:
(1).http://chromedriver.storage.googleapis.com/index.html
(2).https://npm.taobao.org/mirrors/chromedriver/
(3).或者本地下載https://www.jb51.net/softs/538241.html
解壓後將chromedriver.exe 放到chrome的安裝目錄(默認爲:C:\Program Files (x86)\Google\Chrome\Application其實也可以隨便放一個文件夾)。複製chromedriver.exe文件的路徑並加入到電腦的環境變量中去。
完成後在cmd下輸入chromedriver驗證是否安裝成功: