您的位置:首页 > 运维架构 > Linux

CentOS 6 64bit下,Python数据分析环境搭建

2013-04-11 09:58 676 查看
首先是基础环境安装:

yum install zeromq-devel
yum install gcc-gfortran
yum install freetype-devel
yum install libpng-devel
yum install atlas-devel
yum install bzip2-devel
yum install tk-devel
yum install tcl-devel

# Use the system python or install python from source code or use virtualenv to manage your python environment
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
easy_install pip
pip install numpy
pip install scipy
pip install scikit-learn
pip install 'ipython[notebook]'
pip install pandas
pip install matplotlib


配置IPython:

ipython profile create nbserver
cd .ipython/
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
vim /root/.ipython/profile_nbserver/ipython_notebook_config.py
	c.NotebookApp.ip = '*'
	c.NotebookApp.port = 9999
c.IPKernelApp.ip = '*'
	c.NotebookApp.open_browser = False
	c.NotebookApp.certfile = u'/root/.ipython/mycert.pem'
	c.NotebookApp.password = u'sha1:66bb33f7c567:720c02aefd9f807b94164448e3e711facc24dd6a' # from IPython.lib import passwd;passwd();
	c.IPKernelApp.pylab = 'inline'


启动服务

nohup ipython notebook --profile=nbserver &
[1] 7330


之后打开你的服务器https://ip:9999,输入你设置的密码,进入之后,就可以使用浏览器接口做一些数据分析工作了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: