introduction to anaconda

时间:2016-04-15 23:04:45   收藏:0   阅读:367

一、安装好anaconda后进行更新

说明:在windows环境中的操作,在linux环境中请参考具体书籍。

1、进入cmd命令行

执行

1 conda update conda
3 conda update anaconda
4 conda install mkl
1 conda install pylint html5lib seaborn

最后是安装一些anaconda没有的工具。

二、jupyter一些方便的命令

1、cd directory,更改到目的目录

2、edit filename - launch an editor to edit filename

3、ls or ls pattern - list the contents of a directory

4、run filename - run the Python file filename

5、timeit - time the execution of a piece of code or function

6、The special variable _ contains the last result in the console, and so the most recent result can be
saved to a new variable using the syntax x = _.

 

三、配置文件

1、产生配置文件夹

首先配置ipython,配置文件在(windows中)~/.ipython/目录下

打开终端输入以下命令

ipython profile create econometrics

将会产生一个profile_econometrics目录,和一下文件

比较重要的是ipython_config.py文件General IPython setting for all IPython sessions。

2、修改配置文件

打开ipython_config.py文件,进行修改

"import os",
"os.chdir(‘D:\\chengxu\\ML‘)"]

 

3、开始运行进行测试,两种方法

>>> x = randn(100,100)
>>> y = mean(x,0)
>>> plot(y)
>>> import scipy as sp

如果一切正常,会出现如下图所示:

技术分享

5、配置ipython-notebook

在文本编辑器中输入如下命令:

cmd "/c cd Scripts && start "" "ipython.exe" notebook --matplotlib=’inline’--notebook-dir=u’D:\\chengxu\\ML\\’"

保存为ipython-notebook.bat,放在Anaconda2安装目录里

原文:http://www.cnblogs.com/zhaopengcheng/p/5397212.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!