美文网首页我爱编程
Python Environment Setup

Python Environment Setup

作者: aureole420 | 来源:发表于2018-01-16 07:44 被阅读0次

    今天正式开始上Statistical Machine learning。 需要配置Python
    https://conda.io/docs/user-guide/getting-started.html

    下一步还需要做

    • review numpy, matplot, pandas.
    Conda Overview

    The conda command is the primary interface for managing installations of various packages. It can

    • Query and search Anaconda package index and current Anaconda installation.
    • Create new conda environment.
    • Install and update packages into existing conda environments

    Conda environments
    A conda environments is a directory that contains a specific collection of conda packages that you have installed

    1. e.g. you may have one environment with NumPy 1.7 and its dependencies, and another environment with NumPy 1.6 for legacy testing. If you change one environment, your other environments are not affected
    2. You can easily activate or deactivate environments, which is how you switch between them.
    3. conda install [packagename] to install conda packages

    【坑】

    Jupyter notebook ---when importing external .py classes, one has either to reload the class OR restart IPython kernel ---- when the source file is modified.
    initializing dumpy array : note there is no way to initialize an array without filling it with something. i.e it is illegal to initialize an array (like what we do in java or cpp)
    a = np.array((3,4)) #array of shape(3,4)
    instead, one has to use a = np.zeros((3,4)) or a = np.zeros([....]) from existing data https://docs.scipy.org/doc/numpy-1.13.0/reference/routines.array-creation.html

    相关文章

      网友评论

        本文标题:Python Environment Setup

        本文链接:https://www.haomeiwen.com/subject/zoainxtx.html