I have always felt that to build a good environment headache ah! ! ! The most expensive thing is the time! !
1, we must first download Python3, go to the official website to download like this, find the corresponding version
This is a version of Download a Python3: https: //www.python.org/ftp/python/
2, download pip (pip is it simply a Python package management tool that can manage the operation of third-party packages, such as installation, uninstallation, check for updates, view package information, etc.)
(1) Click on the link: https: //bootstrap.pypa.io/get-pip.py, get-pip.py and download files;
Execution python3 get-pip.py is to install pip directory (2) to get-pip.py file, because we are get-pip.py downloaded file, the file is actually a python, we just .py file is executed can be installed pip3.
(3) verify that the installation was successful: input pip3, the following can be displayed.
3, install our selenium enter the command: sudo easy_install selenium, as shown below is a harbinger of success
Want to see if the installation was successful: pip show selenium, the following figure appears on the success of Oh
4, Chrome-based browser, the browser you want to drive to work would download his driver Chromedriver, installed as follows:
After http://chromedriver.storage.googleapis.com/index.html to this address to download the corresponding driver download good
1, download the executable file is moved under / usr / local / bin
sudo mv chromedriver /usr/local/bin/chromedriver
2 ,: modify file permissions
sudo chmod u+x,o+x /usr/local/bin/chromedriver
3, check whether the installation was successful:
chromedriver --version
This environment to build complete ~~
5, pycharm sometimes obviously installed selenium environment, but it is still possible to import the package to fail: You can refer to the following: