我已经在Ubuntu 14.04上安装了Anaconda。Anaconda安装了Python3.6。我已经安装了Python2.7(默认为Ubuntu),然后安装了Python3.4(在Anaconda之前安装)。
尽管Anaconda使导入软件包更加容易,但我无法将代码保存在“ .py”文件中。Anaconda具有ipython(看起来像是空闲的外壳),jupyter(保存在“ .ipynb”中),但没有提供将其另存为扩展名为“ .py”的脚本的功能。我想要IDLE提供的“ .py”脚本。
当我输入终端
anand@anand-dell:~$ python
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
但是当我单击“空闲”时,默认为
Python 3.4.3 (default, Nov 28 2017, 16:41:13)
[GCC 4.8.4] on linux
Type "copyright", "credits" or "license()" for more information.
我如何安装python3.6 IDLE?
idlelib
从cpython仓库下载:https ://minhaskamal.github.io/DownGit/#/home ? url =https : //github.com/python/cpython/tree/3.6/Lib/idlelib
提取idlelib
到水site-packages
蟒。
/usr/local/bin/idle
使用以下内容创建。(请记住修改第一行以更正Anaconda python的路径)
#!/usr/local/lib/python3.6.2/bin/python3.6
from idlelib.pyshell import main
if __name__ == '__main__':
main()
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句