2015-09-27 84 views
1

我想通過執行自動化python測試腳本來捕獲視頻。我使用castro,但castro要求pygame。我通過使用Windows安裝程序安裝了pygame。但仍然得到以下error.let我知道如何使用castro安裝pygame時出錯。如何使用castro

C:\Python35-32\Scripts>pip install pygame==1.9.1release 
Collecting pygame==1.9.1release Could not find a version that satisfies the requirement pygame==1.9.1release (from versions:) 
Some externally hosted files were ignored as access to them may be unreliable 
(use --allow-external pygame to allow). 
No matching distribution found for pygame==1.9.1release 

回答

0

目前,卡斯特羅對蟒蛇+2.5和< 2.6的依賴,所以它不會對你Python35環境中工作

其次,你正確地發現,pygame不適用於pip。你必須通過.msi單獨安裝pygame(選擇正確的版本http://www.pygame.org/download.shtml,並將它指向你正在使用的python.exe目錄)

如果你已經這樣做了,它不應該做「pip install pygame 「再次。你可以看到,如果你已經安裝了pygame的正確通過檢查,它是在你的Python環境下〜\ LIB \站點包\ pygame的

我經歷了類似的問題,並設法得到它的工作由http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame下載.whl文件並安裝它這樣做:

pip install pygame-1.9.2a0-cp35-none-win_amd64.whl 

(是這樣的話,我可以節省WHL在我的回購和劇本,我的CI代理VENV創建過程)

一旦成功,應該允許你這樣做:

pip install castro 

現在,如果您還沒有降級到python 2.7,那麼當您導入castro時,您會看到它抱怨缺少括號,它的init文件是針對所有打印語句以及其他python 2to3不兼容問題的鐵路。

PS:我試圖下載卡斯特羅源代碼,並通過2to3轉換工作 - 我可能會分享更多發現,並且有任何運氣