1

我在安装 python 模块 PyX 时遇到问题,使用 pip 时收到以下错误:

$ pip install PyX
Collecting PyX
  Could not find a version that satisfies the requirement PyX (from versions: )
  Some externally hosted files were ignored as access to them may be unreliable (use --allow-external PyX to allow).
No matching distribution found for PyX

然后我尝试了 conda install,但它找不到它。我也搜索了一下,一无所获。然后我尝试了 pip allow external - 在 Cygwin 或 cmd 上都不起作用:

$ pip install --allow-external pyx pyx
Collecting pyx
  Downloading https://downloads.sourceforge.net/project/pyx/pyx/0.14/PyX 0.14.tar.gz (2.5MB)
No files/directories in c:\cygwin\tmp\pip-build-vqqlqz\pyx\pip-egg-info (from PKG-INFO)

我以前从未见过这样的错误。请问这里有人有什么建议吗(首选安装在Anaconda下)?非常感谢您提前。

4

3 回答 3

6

好的,这是我刚刚找到的一个解决方案。但是,我仍然无法解释以前的错误。

在尝试手动安装 PyX(转到本地 PyX 目录)时:

$ python setup.py install
*** Sorry, this version of PyX runs on Python 3 only. ***
If you want to use PyX on Python 2, please use one of our old releases up to PyX 0.12.x, i.e. execute something like:

   pip install pyx==0.12.1

所以我尝试了:

$ pip install  --allow-external pyx pyx==0.12.1

然后它起作用了。谢谢。

于 2015-09-28T20:39:20.677 回答
2

在撰写本文时,使用该--allow-external标志将产生以下弃用消息:

弃用:--allow-external 已弃用,将来将被删除。由于存储库协议的更改,它不再有任何影响。

执行pip install pyx==0.12.1应该做。

OS X上,您可能会收到以下错误:

错误:无法创建'/Library/Python/2.7/site-packages/pyx':权限被拒绝

使用该--user标志应该允许您安装软件包:

pip install pyx==0.12.1 --user

于 2017-07-31T20:01:56.943 回答
0

我解决了安装 PyX 的问题如下:

  1. 启动 anaconda 导航器,
  2. 启动 IPython QTConsole,
  3. 类型pip install pyx

等待安装完成。

于 2021-12-05T18:41:28.290 回答