2012-05-14 119 views
2

我正在按照 - http://pytest.org/latest/getting-started.html#installation-issues上的說明操作。如何在Windows上安裝py.test

我已經嘗試了很多選項,也在網上搜索。但我仍然遇到以下錯誤。

Installed c:\python26\lib\site-packages\pytest-2.2.3-py2.6.egg 
Processing dependencies for pytest==2.2.3 
Searching for py>=1.4.7.dev2 
Reading http://pypi.python.org/simple/py/ 
Download error: [Errno 11001] getaddrinfo failed -- Some packages may not be found! 
Couldn't find index page for 'py' (maybe misspelled?) 
Scanning index of all packages (this may take a while) 
Reading http://pypi.python.org/simple/ 
Download error: [Errno 11001] getaddrinfo failed -- Some packages may not be found! 
No local packages or download links found for py>=1.4.7.dev2 
Best match: None 

我有Windows XP和Python 2.6。我想在這個設置上安裝py.test。有沒有辦法讓這個工作?

+0

問題出在「getaddrinfo失敗」部分。看到第二個答案在這裏:stackoverflow.com/questions/1290142/python-urllib2-problem – jadkik94

回答

2

從你的指令:

Windows:如果「的easy_install」或「py.test」都沒有找到你需要的Python腳本路徑添加到您的PATH,在這裏看到:Python的用於Windows。您也可以使用ActivePython安裝程序自動爲您執行此操作。

How to set PATH variable

+0

我試過了。但仍然無濟於事。 – Sumod