天天看點

eclipse中pydev插件安裝出錯及環境配置問題總結

想用eclipse學習Python,結果連pydev都安裝不上,總是出現如下問題:

An error occurred while collecting items to be installed 

session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). 

Unable to read repository at http://pydev.org/updates/plugins/org.python.pydev.core_2.7.1.2012100913.jar. 

Read timed out 

Unable to read repository at http://pydev.org/updates/plugins/org.python.pydev.refactoring_2.7.1.2012100913.jar. 

Read timed out 

eclipse中pydev插件安裝出錯及環境配置問題總結

網上搜了一下,大概是由于pydev被和諧了,大概有兩種解決思路

1,直接把pydev下載下傳下來,直接手動安裝。

到pydev的首頁,選擇高于自己Python版本一級的pydev,eg:我的python是2.7.1需要下載下傳2.8版本的pydev;如果pyde版本比自己Python版本高太多将導緻eclipse中不會出現pydev;如果pydev與自己Python版本号相同将導緻pydev環境配置錯誤。pydev下載下傳位址:http://sourceforge.net/projects/pydev/files/pydev/

把下載下傳好的pydev壓縮包内的plugins和features 檔案夾内的内容複制到eclipse的解壓目錄的對應的檔案夾中即可。

2,給eclipse 設定代理---------這種方法暫未嘗試

預設的Eclipse 是不用代理上網,但在一些公司的區域網路,需要使用代理上網,
因而需要手工設定eclipse的上網設定        
window-->preferences-->general-->network connections 
選中 manual proxy configuration: 依次填入http proxy , port就ok 了。
另外,如果代理需要用帳号和密碼就需要選中 Enable proxy authentication,
然後填上 user name  及password   取消,ok.