zoukankan      html  css  js  c++  java
  • 【原创】算法基础之Anaconda(1)简介、安装、使用

    Anaconda 2

    官方:https://www.anaconda.com/

    一 简介

    The Most Popular Python Data Science Platform

    Anaconda® is a package manager, an environment manager, a Python/R data science distribution, and a collection of over 1,500+ open source packages. Anaconda is free and easy to install, and it offers free community support.

    anaconda是一个package管理器,一个环境管理器,一个python/r语言的数据科学发布包,包含1500+开源包;anaconda是免费的并且很容易安装,提供免费社区支持;

    Packages available in Anaconda

    • Over 200 packages are automatically installed with Anaconda.
    • Over 2000 additional open source packages (including R) can be individually installed from the Anaconda repository with the conda install command.
    • Thousands of other packages are available from Anaconda Cloud.
    • You can download other packages using the pip install command that is installed with Anaconda. Pip packages provide many of the features of conda packages and in some cases they can work together. However, the preference should be to install the conda package if it is available.
    • You can also make your own custom packages using the conda build command, and you can share them with others by uploading them to Anaconda Cloud, PyPi or other repositories.

    二 安装

    # wget https://repo.continuum.io/archive/Anaconda2-2018.12-Linux-x86_64.sh
    # chmod u+x Anaconda2-2018.12-Linux-x86_64.sh
    # ./Anaconda2-2018.12-Linux-x86_64.sh

    三 使用

    常用的numpy、pandas、scikit-learn、scipy、matlotlib等包都已安装好,另外还可以下载tensorflow等,

    $ python
    # scipy
    import scipy
    print('scipy: %s' % scipy.__version__)
    # numpy
    import numpy
    print('numpy: %s' % numpy.__version__)
    # matplotlib
    import matplotlib
    print('matplotlib: %s' % matplotlib.__version__)
    # pandas
    import pandas
    print('pandas: %s' % pandas.__version__)
    # statsmodels
    import statsmodels
    print('statsmodels: %s' % statsmodels.__version__)
    # scikit-learn
    import sklearn
    print('sklearn: %s' % sklearn.__version__)

    单独测试一下numpy

    # python
    Python 2.7.5 (default, Oct 30 2018, 23:45:53)
    [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from numpy import *
    >>> a = arange(15).reshape(3, 5)
    >>> a.shape
    (3, 5)
    >>> a.ndim
    2
    >>> a.dtype.name
    'int64'
    >>> a.itemsize
    8
    >>> a.size
    15
    >>> type(a)
    <type 'numpy.ndarray'>
    >>>

  • 相关阅读:
    生活是把锋利的剪刀,看你怎么持有
    稚晖君已经很强了,我们怎么能追逐强人的步伐呢?一些自己的思考
    分享自己做的一个指定进程以及线程长时间cpu监控的工具
    Centos7下配置网卡网桥
    Smokeping安装和配置(Shell一键安装)
    18.jvm调优工具及案例分析
    处理mac不能使用rz和sz的问题
    16.彻底解决Jmap在mac版本无法使用的问题
    17.mac安装homebrew及异常处理
    15. mac安装多版本jdk
  • 原文地址:https://www.cnblogs.com/barneywill/p/10324555.html
Copyright © 2011-2022 走看看