作者:手机用户2602913753 | 来源:互联网 | 2023-07-16 11:31
1安装系统环境及及pypyrpm-ivhhttp:dl.fedoraproject.orgpubepel7x86_64eepel-release-7-6.noarch.
1 安装系统环境及及pypy
rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
yum -y install nginx mysql-libs mysql-devel python-setuptools
yum -y install pypy-libs pypy pypy-devel
2、安装pip
wget –no-check-certificate https://bootstrap.pypa.io/ez_setup.py -O - | python
wget –no-check-certificate https://bootstrap.pypa.io/ez_setup.py -O - | pypy
wget https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb03c64707ce100ecd53934da1aa13/pip-8.1.2.tar.gz#md5=87083c0b9867963b29f7aba3613e8f4a
tar -zxvf pip-8.1.2.tar.gz
cd pip-8.1.2
python setup.py install
pypy setup.py install
3、使用pypy及模块安装:
执行: pypy pythonfile.py (跟python用法一样)
模块安装: pypy -m pip install modulename
numpy安装略有不同:
详见:http://pypy.org/download.html#installing
到2016/06/07,numpy对pypy3的支持还没有很好:
For now, NumPyPy does not work with PyPy3*, and is not complete. You may get warnings or NotImplemented errors. Please let us know if you get crashes or wrong results.
(来自pypy 的numpy项目官网https://bitbucket.org/pypy/numpy.git)
附:关于哪些模块能在pypy里正常安装,哪些不能,官方给了列表,蓝的表示可以,红的表示失败。
http://packages.pypy.org/