Windows installs both Python2 and Python3

Source: Internet
Author: User

Recently carefully see again selenium (hope this is also the most serious one, can read from beginning to end), encountered a problem, selenium3.0.2+python2.7+firefox50.1, mouse event Actionchains () The various mouse action methods of the class are not implemented, and the method is added after the. Perform (), there are errors, thought to be Python2.7 problem, so need to install Pyhton3.6 to verify.

First, install Python2.7 and Python3.6 separately, install step slightly (Installation path: C:\PYTHON27;C:\PYTHON36)

Second, configure the environment variables:

1, Python2.7 Configuration environment variables

C:\Python27; C:\Python27\Scripts;

2, Python3.6 Configuration environment variables

C:\Python36; C:\Python36\Scripts;

Third, the Python2.7 and Python3.6 directories under the Python.exe rename, not only to prevent the input of Python in DOS, it is not clear who started who (2.7?) 3.6? Of course this can be seen in the DOS window into that version of Python, but also convenient to launch the specified version of the Python.exe

1. Python2.7/python.exe renamed to Python2.exe

2. Python3.6/python.exe renamed to Python3.exe

3. Enter Python2 and Python3 in DOS, respectively, into python2.7 and python3.6 environment respectively.

Iv. Download the Setuptools and extract it to the python2.7 (or 3.6) \lib\site-packages directory respectively

1. Download path: Https://pypi.python.org/pypi/setuptools

2. DOS window, locate the Setuptools folder and run the installation file

Python2 (or 3) easy_install.py install

3. The DOS interface prompts the installation to be successful.

Download Pip, extract to python2.7 (or 3.6) \lib\site-package directory respectively

1. Download path: HTTPS://PYPI.PYTHON.ORG/PYPI/PIP

2. DOS window, locate the PIP folder and run the installation file

Python2 (or 3) easy_install.py install

3, DOS interface prompt installation success is OK

VI. Install Selenium via PIP

1, python2.7 under the installation of selenium2.53.0

Pip Install selenium==2.53.0

The DOS interface prompts you to install successfully.

2, python3.6 installation Selenium the latest version

Pip Install Selenium

The DOS interface prompts you to install successfully.

3, python3.6 installed selenium3.x, also need to install Geckodriver (: https://github.com/mozilla/geckodriver/releases/)

At this point, Windows, python2.7 and python3.6 installations are complete.

Refer to the blog post, thanks to my reference to the author of the blog, the original picture tutorial:

Colleagues install Python2 and Python3 on the same computer http://www.cnblogs.com/zhengyihan1216/p/6011640.html

Windows installs both Python2 and Python3

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.