Home  >  Article  >  Backend Development  >  Detailed introduction to the installation and use of open source software packages and environmental management system Anaconda

Detailed introduction to the installation and use of open source software packages and environmental management system Anaconda

巴扎黑
巴扎黑Original
2017-09-05 11:38:411589browse

Anaconda is a Python distribution for scientific computing. It supports Linux, Mac, and Windows systems. It provides package management and environment management functions, and can easily solve the coexistence and switching of multiple versions of python and various third-party packages. Installation issues.

Anaconda is actually a software distribution that comes with conda, Python and more than 150 scientific packages and their dependencies. Among them, conda is an open source software package management system and environment management system. It has similar functions to virtualenv and can install Python2 and Python3 on the computer at the same time.

Installation:

I tried it, but it cannot be installed using pip. You need to download it from the official website and then install it.

conda use

Manage packages through conda


# 安装pandas
$ conda install pandas
# 更新pandas
$ conda update pandas
# 删除pandas
$ conda remove pandas
# 搜索
$ conda search pandas

Manage environments:


# 创建py2的python2环境,自带pandas和numpy
$ conda create -n py2 python=2 pandas numpy
# 激活py2环境,通过python -V可以看到是python2.7
$ source activate py2
# 退出py2环境
$ source deactivate
# 创建py3的Python3环境
$ conda create -n py3 python=3 pandas numpy
# 激活py3环境
$ source activate py3
# py3环境中安装相关包
$ conda install pandas

Note: Packages installed in py3 cannot be seen in py2. The environments of py2 and py3 are completely isolated.

Anaconda has the characteristics of cross-platform, package management, and environment management, so it is very suitable for quickly deploying Python environments on new machines.

The above is the detailed content of Detailed introduction to the installation and use of open source software packages and environmental management system Anaconda. 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