下载地址:https://pypy.org/download.html
# python2.7版本
yum install pypy
# python3.6版本
https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.1-src.tar.bz2
# python3.5版本
wget https://bitbucket.org/pypy/pypy/downloads/pypy3.5-v7.0.0-src.tar.bz2
# 编译环境准备
yum -y install gcc
yum -y install gcc-c++
yum install libffi-devel
wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.tar.gz
tar -zxvf pkg-config-0.29.tar.gz
cd pkg-config-0.29
./configure --with-internal-glib
make & make install
wget https://files.pythonhosted.org/packages/44/39/6bcb83cae0095a31b6be4511707fdf2009d3e29903a55a0494d3a9a2fac0/PyMySQL-0.8.1.tar.gz
cd PyMySQL-0.8.1/
tar zxvf PyMySQL-0.8.1.tar.gz
pypy3 setup.py install
#pypy3 -m pip install PyMySQL
#pypy3 -m pip install tensorflow==2.0.0-beta1
#
tar -xjf pypy3.5-v7.0.0-src.tar.bz2
cd pypy3.5-v7.0.0-src/
make
ln -s /data/download/pypy3.5-v7.0.0-src/pypy/goal/pypy3-c /usr/bin/pypy3
ln -s /data/download/pypy3.5-v7.0.0-src/pypy/goal/pypy3-c /usr/bin/pypy
安装pip
wget https://bootstrap.pypa.io/get-pip.py pypy get-pip.py
用[pypy]/bin下的pip安装第三方库
.pip.exe install tornado
.pip.exe install redis
或者
pypy -m pip install package
可能需要修改py添加路径
import sys import os parent_path = os.path.dirname(sys.path[0]) if parent_path not in sys.path: sys.path.append(parent_path) print(parent_path)
执行
D: oolspypy3.6-v7.1.1-win32pypy3.exe test_client.py