安装:
Win
直接官网下载安装就好了linkMac安装:
brew install pypy
#brew install pypy
# Then appear:
# A "distutils.cfg" has been written to:
# /usr/local/Cellar/pypy/2.6.1/libexec/lib-python/2.7/distutils
# specifying the install-scripts folder as:
# /usr/local/share/pypy
#
# If you install Python packages via "pypy setup.py install", easy_install_pypy,
# or pip_pypy, any provided scripts will go into the install-scripts folder
# above, so you may want to add it to your PATH *after* /usr/local/bin
# so you don't overwrite tools from CPython.
#
# Setuptools and pip have been installed, so you can use easy_install_pypy and
# pip_pypy.
# To update setuptools and pip between pypy releases, run:
# pip_pypy install --upgrade pip setuptools
安装外部库
由于pypy是独立的解析器,所以不能使用python中的外部库如numpy等.需要额外安装.一般的库,使用pypy提供的相应版本工具
easy_install_pypy
,pip_pypy
安装即可.其中NumPy需要安装其提供的版本:
# 直接pip安装
pypy -m pip install git+https://bitbucket.org/pypy/numpy.git
# 或以下方式:
git clone https://bitbucket.org/pypy/numpy.git
cd numpy
pypy setup.py install
No comments:
Post a Comment