Python 机器学习的开发环境搭建(numpy,scipy,matplotlib)
来源:互联网 发布:素描照片的软件 编辑:程序博客网 时间:2024/06/13 15:22
一、概述
Numpy :
Numpy :
主要用来做一些科学运算,主要是矩阵的运算。NumPy为Python带来了真正的多维数组功能,并且提供了丰富的函数库处理这些数组。它将常用的数学函数都进行数组化,使得这些数学函数能够直接对数组进行操作,将本来需要在Python级别进行的循环,放到C语言的运算中,明显地提高了程序的运算速度。【1】
Scipy:
Scipy:
主要是一些科学工具集,信号处理工具集(如线性代数使用LAPACK库,快速傅立叶变换使用FFTPACK库)及数值计算的一些工具(常微分方程求解使用ODEPACK库,非线性方程组求解以及最小值求解等)【1】。
Scikit-learn:
Scikit-learn:
里面有很多机器学习相关的算法(如聚类算法,SVM等)。【2】
Matplotlib:
Matplotlib:
是一个画图工具和Matlab中的画图工程类似。
二、安装
Ubuntu 下的安装
window 下的安装
二、安装
Ubuntu 下的安装
- sudo apt-get install python-numpy
- sudo apt-get install python-scipy
- sudo apt-get install python-matplotlib
- sudo apt-get install python-sklearn
到下面的网址下载自己的需要的exe文件,然后直接安装就即可。
Numpy
http://sourceforge.net/projects/numpy/files/NumPy/1.9.0/
Scipy
http://sourceforge.net/projects/scipy/files/
Matplotlib
http://jaist.dl.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.4.0/
scikit-learn下载地址:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn
在下载以上扩展库时,需注意python安装的版本和系统版本。例如笔者安装的是python2.7,64位,则下载这两版本的工具库进行安装。
Numpy
http://sourceforge.net/projects/numpy/files/NumPy/1.9.0/
Scipy
http://sourceforge.net/projects/scipy/files/
Matplotlib
http://jaist.dl.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.4.0/
scikit-learn下载地址:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn
在下载以上扩展库时,需注意python安装的版本和系统版本。例如笔者安装的是python2.7,64位,则下载这两版本的工具库进行安装。
三、安装过程问题及解决方案
![](file:///C:/Users/Administrator/Documents/My%20Knowledge/temp/9e6106ab-0d17-48f5-8b7f-7879c4b97e15_128_files/881d7c80-8e27-40d7-bc73-c2de83d0df46.jpg)
安装时无法识别已安装的Python,这是由于Windows版本的原因,win7是 64的,在安装python(32位)时,如果选择只为当前用户,以上问题是不会出现的。
## script to register Python 2.0 or later for use with win32all# and other extensions that require Python registry settings## written by Joakim Loew for Secret Labs AB / PythonWare## source:# http://www.pythonware.com/products/works/articles/regpy20.htm## modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html import sys from _winreg import * # tweak as necessaryversion = sys.version[:3]installpath = sys.prefix regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)installkey = "InstallPath"pythonkey = "PythonPath"pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % ( installpath, installpath, installpath) def RegisterPy(): try: reg = OpenKey(HKEY_CURRENT_USER, regpath) except EnvironmentError as e: try: reg = CreateKey(HKEY_CURRENT_USER, regpath) SetValue(reg, installkey, REG_SZ, installpath) SetValue(reg, pythonkey, REG_SZ, pythonpath) CloseKey(reg) except: print "*** Unable to register!" return print "--- Python", version, "is now registered!" return if (QueryValue(reg, installkey) == installpath and QueryValue(reg, pythonkey) == pythonpath): CloseKey(reg) print "=== Python", version, "is already registered!" return CloseKey(reg) print "*** Unable to register!" print "*** You probably have another Python installation!" if __name__ == "__main__": RegisterPy()运行这个python程序,显示“python 2.7 is already registered”,再安装上面扩展库时,就能自动识别出来python2.7了。
0 0
- python 机器学习的开发环境搭建(numpy,scipy,matplotlib,scikit-learn)
- Python 机器学习的开发环境搭建(numpy,scipy,matplotlib)
- python 机器学习的开发环境搭建(numpy,scipy,matplotlib)
- Windows下Python机器学习环境搭建(pip numpy scipy matplotlib scikit-learn nltk)
- Python-学习笔记(三)——开发环境搭建(numpy,scipy,matplotlib)
- Windows中python机器学习numpy,scipy,matplotlib的安装
- Python搭建Numpy、SciPy、MatPlotLib环境(下载、安装、测试)
- 腾讯云Ubuntu14.04搭建机器学习环境(jupyter和numpy,scipy,matplotlib,pandas,scikit-learn)
- [机器学习]Python中Numpy,Pandas,Matplotlib,Scipy,Seaborn介绍
- 机器学习实战python环境搭建以及numpy和matplotlib安装遇到的各种问题(一)
- window下安装Python的机器学习包numpy+scipy+matplotlib+scikit-learn
- 在windows上安装python的机器学习包numpy scipy scikit_learn matplotlib
- 【python机器学习】Win10+python3.5+numpy+matplotlib+scipy+sklearn的安装
- window下安装Python的机器学习包numpy+scipy+matplotlib+scikit-learn
- 机器学习 Numpy Scipy Matplotlib Scikit-Learn的安装
- 在win7下安装python开发环境和numpy,scipy,matplotlib模块的问题
- 安装配置Python+Numpy+Scipy+Matplotlib环境
- Python 的 Numpy SciPy MatPlotLib配置
- 标准Web系统的架构分层
- JavaEE学习路线图
- plsql导出导入一张表的数据
- webview加载网页出现("找不到网页net:err_unknown_url_scheme")
- Android基础动画,组合动画,帧动画,布局动画,Activity跳转动画
- Python 机器学习的开发环境搭建(numpy,scipy,matplotlib)
- 苹果助手开发随笔系列:3、后续功能所需要的服务
- 如何设计一个RPC系统
- JSP基础
- Android使用AsyncTask加http用post方式上传图片到服务器
- Extjs中创建Store数据源的方式
- easyui pagination buttons元素上添加title显示
- Android NetUtils-跟网络相关的工具类
- ViewDragHelper 使用