Home  >  Article  >  Backend Development  >  Two pythons implement switching function

Two pythons implement switching function

小云云
小云云Original
2018-03-30 17:04:402106browse

This article mainly shares with you two python implementations of switching functions, hoping to help everyone.

# After installation, use activate to activate an environment
activate python34 # for Windows
source activate python34 # for Linux & Mac
# After activation, you will find that there are many places for terminal input The word python34 is missing. In fact, what the system does at this time is to remove the default 2.7 environment from the PATH, and then add the commands corresponding to 3.4 to the PATH

# At this time, enter
python again -- version
# You can get `Python 3.4.5 :: Anaconda 4.1.1 (64-bit)`, that is, the system has been switched to the 3.4 environment

# If you want to return to the default python 2.7 environment, run
deactivate python34 # for Windows
source deactivate python34 # for Linux & Mac

# Delete an existing environment
conda remove --name python34 --all

Related recommendations:

Two Python web frameworks: Django & Tornado comparison

The above is the detailed content of Two pythons implement switching function. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn