作者brightwish (密码同帐号)
看板Python
标题[问题] Python3能够在lighttable上正常运作吗?
时间Mon Apr 24 14:21:42 2017
刚刚尝试在lighttable用python3.5.2编译
发现在import时会跳exception
http://i.imgur.com/FrXZXcW.jpg
print()也会跳exception
http://imgur.com/uL5JAxp.jpg
google了一下
有人教学windows把python加入环境变数path就可以了,但我本来就加进去了
https://www.youtube.com/watch?v=WvzUhwZUDgg
github上有这样的说明(for linux):
If you want that Light Table for eval use some other version of Python, put
in your user.behaviors following:
[:app :lt.plugins.python/python-exe "/usr/bin/pythonX"]
where X is 3 or 3.5 or whatever Python version you have installed and you
want to use with LightTable eval.
我不确定我改成windows的路径适不适用,总之没成功
然後发现github上这个问题还没解决的样子?
https://github.com/LightTable/Python/pull/28
https://github.com/LightTable/Python/issues/24
print的问题似乎有解,但是我import也出问题
想请问有没有人在lighttable上使用python3的,分享一下解决办法
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 59.127.25.219
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1493014910.A.EEE.html
1F:→ uranusjr: 看起来就是你编到 Python 2 去了, 不过很难隔空解... 04/24 16:11
请问u大有在LT上面用python3吗?
我只有安装python3的编译器,如果把他移除掉,LT还会跳出说找不到python
另外exception里写的内容都是LT的python plugin
不懂的点在於plugin的程式码是给python2用的 那要怎麽样让python3可以兼容?
※ 编辑: brightwish (59.127.25.219), 04/24/2017 16:35:11