官术网_书友最值得收藏!

Installing Anaconda

All the examples in the book use the Anaconda version of Python. Anaconda is an open source distribution of Python. It is widely used for scientific computing and processing a large volume of data. It provides an excellent package management environment. It provides support for Windows, macOS, and Linux. Anaconda comes with Python installed along with popular packages used for scientific computing such as NumPy, SciPy, and so on.

To download Anaconda, visit https://www.anaconda.com/download/, where you will see an option for downloading Anaconda for different platforms.

If you are using Windows or Mac, you can directly download the graphical installer according to your machine architecture and install using the graphical installer.

If you are using Linux, follow these steps:

  1. Open your Terminal and type the following to download Anaconda:
wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
  1. Upon completion, we can install Anaconda via the following command:
bash Anaconda3-5.0.1-Linux-x86_64.sh

After successful installation of Anaconda, we need to create a new Anaconda environment that is basically a virtual environment. What is the need for a virtual environment? Say you are working on project A, which uses NumPy version 1.14, and project B, which uses NumPy version 1.13. So, to work on project B you either downgrade NumPy or reinstall Anaconda. In each project, we use different libraries with different versions which are not applicable to other projects. Instead of downgrading or upgrading versions or reinstalling Anaconda every time for a new project, we use a virtual environment. This creates an isolated environment for the current project so that each project can have its own dependencies and will not affect other projects. We will create such an environment using the following command and name our environment universe:

conda create --name universe python=3.6 anaconda

We can activate our environment using the following command:

source activate universe
主站蜘蛛池模板: 阳城县| 乌兰县| 安塞县| 东光县| 白城市| 株洲县| 治县。| 高淳县| 常山县| 郁南县| 红安县| 高淳县| 克什克腾旗| 岳西县| 闽清县| 海林市| 新巴尔虎右旗| 额尔古纳市| 南皮县| 江孜县| 米易县| 辽宁省| 天台县| 房产| 渭南市| 苏州市| 吉隆县| 来安县| 年辖:市辖区| 蒙城县| 岚皋县| 讷河市| 四川省| 哈巴河县| 永泰县| 剑河县| 临夏县| 邵东县| 嘉黎县| 古交市| 永新县|