pip install -d 不为 cffi 创建轮子

pip install -d not creating wheel for cffi

我正在尝试为 python 代码创建 "offline package"。

我是 运行 pip install -d <dest dir> -r requirements.txt 问题是 cffi==1.6.0(在 requirements.txt 内)没有内置到轮子中。

有什么办法可以做到吗? (我试图避免在目标机器上对 gcc 的依赖)

install -d 只是下载包;它不会构建它们。要强制将所有内容内置到轮子中,请改用 pip wheel 命令:

pip wheel -w <dir> -r requirements.txt