blogger himself in learning machine learning process, see the related books use Python version is different, but want to each version can know how to use, next, bloggers to introduce a more simple and convenient way:
First: Install the Python environment, highly recommended to use Anaconda,anaconda is a python release, if Python is compared to Linux, then Anancoda is CentOS or Ubuntu.
The first step. Installation Anaconda 3 (Note: first install ANACONDA2 or 3 version can, no problem), download address: https://www.anaconda.com/download/, installation Anaconda method is simpler, do not repeat.
The second step, after installing the Anaconda3, will have a Anaconda Navigator application, open and run it, check enviroments this option. 、
you can see, the above figure, there are four environments, of course, out of root, the rest are the landlord's own creation of the environment. Next, the landlord will show you how to create a python2,python3 environment. step1. Select the Create option.
STEP2. Name the newly created environment as NEWPY2. and select the Python package as the python2.7 version. The stand-alone Create button creates this environment. Note that its environment is located at: E:\anaconda3\envs\newpy2. (This is critical for us to change the project interpret on Pycharm)
Step3. Now you can see the newly created environment named Newpy2, Python2 ,
Repeat the steps above to package selection 3.6 in the Create new enviroment option. You can install Python3 and python2 two environments in Anaconda. Next, we'll see how to add Python2 and Python3 to the Pycharm (click here) to ensure that we can switch python3,python2 environments at will.