2015-09-28 75 views
1

安裝PYX,我使用PIP時收到以下錯誤:失敗我在安裝Python模塊PYX問題使用蟒蛇

$ 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 

然後我試圖暢達安裝,但它無法找到它。我也搜索,沒有發現。然後我試圖PIP允許外部 - 在任的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首選)?非常感謝你提前。

+0

是。如已在帖子中所示:) – Helene

+0

Anaconda的創建者在這個問題上有一篇很好的博客文章。幸運的是它存在於webcache中:http://webcache.googleusercontent.com/search?q=cache:KnFhxI4_wMwJ:www.continuum.io/blog/conda%20&cd=3&hl=zh-CN&ct=clnk&gl=il。也許你可以在那裏找到答案。 –

回答

5

好的,我剛剛找到了一個解決方案。但是,我仍然無法解釋以前的錯誤。

在嘗試手動安裝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 

然後它的工作。謝謝。

1

在撰寫本文時,使用--allow-external標誌將產生以下棄用的消息:

DEPRECATION: --allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.

執行pip install pyx==0.12.1應該做的。

OS X,您可能會收到以下錯誤:

error: could not create '/Library/Python/2.7/site-packages/pyx': Permission denied

使用--user標誌應該讓你安裝軟件包:

pip install pyx==0.12.1 --user