2016년 9월 29일 목요일

Windows 환경에서 Python Selenium 설치

precodition : python3.5 설치 및 path 설정

(1) python selenium 라이브러리 설치


C:\PYTHON_HOME\..\Scripts
pip install -U selenium
실행 시 SSL 오류가 발생하였음

 Could not fetch URL https://pypi.python.org/simple/selenium/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645) - skipping
  Could not find a version that satisfies the requirement selenium (from versions: )
No matching distribution found for selenium

[해결방안]

  1. pip upgrade(pip 버전 확인 pip --version)
  2. easy_install pyopenssl 실행
  3. pip install --upgrade --trusted-host pypi.python.org selenium








출처 : http://selenium-python.readthedocs.io/installation.html


댓글 3개:

  1. firefox는 WebdriverException... if you specified a log file in the Firefox Binary constructor, check it for details
    라는 오류가 발생함.

    chrome은 정상 동작함.

    답글삭제
  2. IEDriverServer 실행 시

    selenium.common.exceptions.WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones.

    답글삭제
  3. FireFox 실행 시

    selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Profile Dir: C:\Users\SEOKCH~1\AppData\Local\Temp\tmpyxe69geu If you specified a log_file in the FirefoxBinary constructor, check it for details.

    답글삭제