我決定嘗試使用Eclipse和PyDev而不是IDLE。 我成功「安裝」了Eclipse SDK 3.7。 之後,我按照PyDev網站上顯示的步驟成功安裝了插件。 但是,當試圖配置我的解釋器(Python 3.2.3)時,我總是得到一個錯誤,不知道如何解決這個問題。 我無法自動或手動配置它,PyDev網站上也沒有提到這個錯誤。Eclipse,PyDev和Python配置錯誤
當試圖自動配置,顯示的信息是:
Unable to gather the needed info from the system.
This usually means that your interpreter is not in the system PATH.
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 2-byte UTF-8 sequence.
當我嘗試手動進行配置,顯示的信息是一樣的,並稱該問題的一些常見的原因可能是不兼容的版本。我有最新的Java(這是其中一個要求,Eclipse從他們的網站剛剛昨天下載並且是3.7版本(Indigo),並且Python是3.2.3版本)
我甚至試圖添加一個包含圖書館,因爲,從我的理解,這也將做的伎倆。但是,每當我點擊New Folder
按鈕,它什麼也不做......
我運行這一切在Windows 7 32位。
如果有人能幫助我解決這個問題,我會非常感謝。
謝謝
> **@Fabio Zadrozny:**
>
> 1: The path to the Python interpreter is C:\Python32\python.exe
>
> 2: The message displayed when I ran the
> interpreterInfo.py was:
>
> C:\Windows\system32>python
> C:\eclipse-SDK-3.7-win32\eclipse\plugins\org.python.p
> ydev_2.6.0.2012041219\PySrc\interpreterInfo.py
>
> <xml>
> <version>3.2</version> <executable>C:\Python32\python.exe</executable>
> <lib
> path="out">C:\eclipse-SDK-3.7-win32\eclipse\plugins\org.python.pydev_2.6.0.
> 2012041219\PySrc</lib> <lib path="ins">C:\Python32\MÓDULOS</lib> <lib
> path="out">C:\Windows\system32\python32.zip</lib> <lib
> path="ins">C:\Python32\DLLs</lib> <lib
> path="ins">C:\Python32\lib</lib> <lib path="ins">C:\Python32</lib>
> <lib path="ins">C:\Python32\lib\site-packages</lib>
> <forced_lib>__main__</forced_lib> <forced_lib>_ast</forced_lib>
> <forced_lib>_bisect</forced_lib> <forced_lib>_codecs</forced_lib>
> <forced_lib>_codecs_cn</forced_lib>
> <forced_lib>_codecs_hk</forced_lib>
> <forced_lib>_codecs_iso2022</forced_lib>
> <forced_lib>_codecs_jp</forced_lib>
> <forced_lib>_codecs_kr</forced_lib>
> <forced_lib>_codecs_tw</forced_lib>
> <forced_lib>_collections</forced_lib> <forced_lib>_csv</forced_lib>
> <forced_lib>_datetime</forced_lib> <forced_lib>_functools</forced_lib>
> <forced_lib>_heapq</forced_lib> <forced_lib>_io</forced_lib>
> <forced_lib>_json</forced_lib> <forced_lib>_locale</forced_lib>
> <forced_lib>_lsprof</forced_lib> <forced_lib>_md5</forced_lib>
> <forced_lib>_multibytecodec</forced_lib>
> <forced_lib>_pickle</forced_lib> <forced_lib>_random</forced_lib>
> <forced_lib>_sha1</forced_lib> <forced_lib>_sha256</forced_lib>
> <forced_lib>_sha512</forced_lib> <forced_lib>_sre</forced_lib>
> <forced_lib>_string</forced_lib> <forced_lib>_struct</forced_lib>
> <forced_lib>_subprocess</forced_lib>
> <forced_lib>_symtable</forced_lib> <forced_lib>_thread</forced_lib>
> <forced_lib>_warnings</forced_lib> <forced_lib>_weakref</forced_lib>
> <forced_lib>array</forced_lib> <forced_lib>atexit</forced_lib>
> <forced_lib>audioop</forced_lib> <forced_lib>binascii</forced_lib>
> <forced_lib>builtins</forced_lib> <forced_lib>cmath</forced_lib>
> <forced_lib>errno</forced_lib> <forced_lib>gc</forced_lib>
> <forced_lib>imp</forced_lib> <forced_lib>itertools</forced_lib>
> <forced_lib>marshal</forced_lib> <forced_lib>math</forced_lib>
> <forced_lib>mmap</forced_lib> <forced_lib>msvcrt</forced_lib>
> <forced_lib>nt</forced_lib> <forced_lib>operator</forced_lib>
> <forced_lib>parser</forced_lib> <forced_lib>signal</forced_lib>
> <forced_lib>sys</forced_lib> <forced_lib>time</forced_lib>
> <forced_lib>winreg</forced_lib> <forced_lib>xxsubtype</forced_lib>
> <forced_lib>zipimport</forced_lib> <forced_lib>zlib</forced_lib>
> </xml>Traceback (most recent call last): File
> "C:\eclipse-SDK-3.7-win32\eclipse\plugins\org.python.pydev_2.6.0.20120412
> 19\PySrc\interpreterInfo.py", line 142, in <module>
> raise RuntimeError('Ok, this is so that it shows the output (ugly hack for s ome platforms, so that it releases the output).')
> RuntimeError: Ok, this is so that it shows the output (ugly hack for
> some platfo rms, so that it releases the output).
Thank you for your help! And sorry for the formatting.
您是否在執行Window-> Preferences-> PyDev-> Interpreter-> Python並選擇Python 3.2.3在您的機器上的可執行文件的路徑? – ely 2012-04-17 16:24:59
我做到了。然後Eclipse說: 「在獲取口譯信息時出錯 常見原因包括: - 使用不受支持的版本(Python和Jython至少需要......等等等等) - 指定一個無效的解釋器(通常是一個指向實際解釋器的鏈接在Mac或Linux) 原因:查看錯誤日誌的詳細信息「 ,然後有我發佈在頂部,從com.sun .... UTF-8序列開始的消息。 – JNat 2012-04-17 16:35:17
可能想給更多的細節,如操作系統,版本,位(Windows 64位是一個PITA與整個32/64位共存的東西)。 – 2012-04-17 16:40:03