使用Python 3.4在Textmate 2中输出错误
我在Mac OSX中使用Textmate 2.0,每次运行脚本时都无法让它停止打印错误消息。它一直在说:使用Python 3.4在Textmate 2中输出错误,python,macos,python-3.x,textmate2,Python,Macos,Python 3.x,Textmate2,我在Mac OSX中使用Textmate 2.0,每次运行脚本时都无法让它停止打印错误消息。它一直在说: Error in sitecustomize; set PYTHONVERBOSE for traceback: AttributeError: 'NoneType' object has no attribute 'name' 我所做的只是将值/usr/local/bin/python3添加到Preferences菜单中的TM_PYTHON变量中 有人知道发生了什么吗?TextMate的
Error in sitecustomize; set PYTHONVERBOSE for traceback:
AttributeError: 'NoneType' object has no attribute 'name'
我所做的只是将值/usr/local/bin/python3
添加到Preferences菜单中的TM_PYTHON
变量中
有人知道发生了什么吗?
TextMate
的Python包在幕后做了一些奇怪的事情,能够截获解释器输出和其他好东西。在这样做的过程中,在Python3.4中,对于Python3.3新的importlib
中的importreload()
回归,它似乎遇到了一个不完整的修复。我已经准备好了
同时,如果您希望,您应该能够通过在Python 3.4的sys.path
目录中创建一个伪sitecustomize.py
文件来消除这些消息。例如,在端子外壳中,运行:
echo '' > $(/usr/local/bin/python3.4 -c 'import site; print(site.getusersitepackages())')/sitecustomize.py
我还对TM Python捆绑包的问题跟踪器发表了评论: