Under Linux, the alias command can be used to solve the coexistence problem of Python3 and python2, in fact, under Windows can also use this idea to solve the coexistence of python2 and Python3, but the steps are slightly cumbersome.
First set up a bat file to establish the corresponding relationship between aliases.
@doskey python3="c:\Users\Administrator\Anaconda3\python.exe" $*@doskey Ipython3 ="C:\Users\Administrator\Anaconda3\Scripts\ipython.exe" $*@doskey PIP3= " C:\Users\Administrator\Anaconda3\Scripts\pip.exe " $*
Where @doskey corresponds to the alias command in Linux, then the corresponding relationship between the command and the corresponding initiator path is specified. Focus on $*, which indicates that there may be parameters after the alias command.
The following need to modify the registry, each time you start cmd, automatically run the above script.
Under HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor, create a Autorun string value that specifies the path to the bat file above.
Enjoy it!
Python3 and Python3 coexist under windows