【python】python path,macports,easy-install,numpy,scipy,ipython,matplotlib,集成工具...

本文介绍了两个Python科学计算集成套件:python(x,y)和EPD(Enthought Python Distribution),并提供了安装指南及macOS环境下常用扩展包的安装方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

两个集成套件,包括了科学计算用到的包

1、python(x,y) 一看名字就是用来做科学计算的 甚至将Eclipse 和qt都包括进来了
地址
http://code.google.com/p/pythonxy/
包括如下python组件
Python/xy/xydoc/PyQt/QtHelp/PyQwt/PyQwt3D/PyGTK/wxPython/NumPy/SciPy/numexpr/Matplotlib/PIL/IPython/Pyreadline/SetupTools/ETS/VTK/ITK/pydicom/VPython/PyOpenGL/OpenCV/SymPy/cvxopt/NetworkX/MDP/PyTables/h5py/ReportLab/pyExcelerator/GDAL/PP/Pywin32/pyvisa/PyParallel/PySerial/Cython/Pyrex/py2exe/Sphinx/docutils/jinja/docutils/pygments/docutils/Epydoc/nose/pylint/winpdb

2、EPD(Enthought Python Distribution) 没有集成开发环境 但常用的包都有 虽然不是免费版 不过下载时可以选择学术选项 和免费版没区别
地址
http://enthought.com/products/epd.php
组件列表
altgraph/argparse/basemap/CherryPy/cmake/configobj/coverage/Cython/docutils/Enstaller/EPD_Py25/epydoc/ETPCore/ETPLib/ETS/foolscap/fpconst/freetype/gadfly/Graphviz/grin/hdf4/hdf5/ipython/Jinja/lapack_lite/libpng/libxml2/libxslt/lxml/matplotlib/mingw/modulegraph/mpi4py/mpich2/MySQL-python/netcdf/networkx/nose/numarray/numpy/openssl/PIL/ply/portaudio/pyAudio/pycdf/pycrypto/pydot/pygarrayimage/pyglet/Pygments/pyhdf/PyOpenGL/pyOpenSSL/pyparsing/pyproj/Pyrex/pyserial/pysvn/pytables/python_dateutil/pytz/PyVISA/pywin32/PyXML/ReportLab/ScientificPython/scikits.rsformats/scipy/scite/scons/simplejson/soaplib/SOAPpy/Sphinx/SQLAlchemy/swig/sympy/testoob/Twisted/VTK/windows_extras/wxPython/ZConfig/zdaemon/zlib/ZODB3/zope.interface/zope.proxy/zope.testing

===============================================

ide:

1、wing ide

2、eclipse

===============================================

A、查看python path:

import sys

sys.path或:for line in sys.path: print line

 

mac上安装python和扩展包

先说几个工具

1、Macports:mac上的安装管理软件的工具,类似linux上的apt-get和yum

sudo port install ***

port search ***  很好用

2、easy-install :python扩展包管理工具,可以很容易的安装需要的包

http://www.yancong.su/2012/08/208

通过MacPorts添加Python, NumPy, SciPy, PyLab  很容易就安装上了

一、使用Macports

sudo port install py27-numpy

sudo port install py27-scipy

sudo port install py27-matplotlib

NumPy is installed in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy

测试Pylab:

python
import pylab
pylab.plot([1,2,3,4])
pylab.show()

或这样测试:

>>>import numpy as np
>>>np.test('full')
>>>import scipy
>>>scipy.test()  //我安装好后,test()发现有些没通过,有些错误。。。无语
test()的输出里面能看到numpy和scipy的安装包的位置
 
话说我的ipython也是这样安装上的(貌似有没装好。。fuck)
port search ipython
sudo port install py27-ipython
 
二、使用easy-install,貌似这个更好,能自动添加上依赖
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值