问题
My favorite Python shell is DreamPie and I want to use it with Python 3.2. I've used the "add interpreter" DreamPie app and added Python 3.2. When opening the Python 3.2 DreamPie instance I get the following error message:
Indeed, Python 3.2 isn't mentioned on the DreamPie website as supported, but I still want to know if there's a way to make it work anyway.
回答1:
A quick search of the DreamPie issues found Can't launch python 3.2 which contains the following workaround in the first comment:
To fix the issue edit
\dreampie\subp_main.py
, replace:sys.setdefaultencoding('utf-8')
with:
import platform if not "3.2" in platform.python_version(): sys.setdefaultencoding('utf-8')
Tested on WindowsXP SP3, both Python2.7 and Python3.2 can be used with this fix.
There are a number of other suggested workarounds in later comments.
Edit:
A fix for this issue has already been committed but is not in a stable release as far as I can tell.
回答2:
This has now been fixed and works in the latest stable DreamPie release, 1.2.1. I'm using it and it works fine; I tested with both Python 3.2 and 3.4. On the DreamPie homepage it says:
Supports virtually all Python implementations: 2.5+, 3.1+, Jython, IronPython and PyPy.
Here's a screenshot I took:
来源:https://stackoverflow.com/questions/10354376/dreampie-doesnt-work-with-python-3-2