如何从外部托管源 pip 安装 pyx 包?

How can I pip install pyx package from externally hosted source?

pip 知道 pyx 包:

$ pip search pyx
PyX - Python package for the generation of PostScript and PDF files

尝试安装时出现错误:

$ pip install pyx
Collecting pyx
  Could not find any downloads that satisfy the requirement pyx
  Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pyx to allow).
  No distributions at all found for pyx

我按照错误信息使用了--allow-external pyx,但得到了不同的错误:

$ pip install --allow-external pyx
You must give at least one requirement to install (see "pip help install")

如何使用pip安装pyx包?

您需要告诉 pip 允许外部 pyx 包 实际安装它。

pip install --allow-external pyx pyx

按这个顺序写的,好像有点多余,但是要安装的包名和--allow-external选项是分开的。

好吧,我遇到了同样的问题,但我使用给定的命令解决了这个问题。

下面提到的命令用于 python2

sudo pip install pyx==0.12.1