我已经下载了Python,但想为Enthought Tool Suite(ETS)贡献代码。 根据本网站(http://code.enthought.com/source/):
它说要下载以下 Python 脚本: https://raw.github.com/enthought/ets/master/ets.py
我将 ets.py 放入python脚本中,另存为...在 Python Shell 中,我输入了"import ets"
但是,什么也没发生。
此外,该网站还说要运行以下命令:
$ mkdir ets
$ cd ets # and copy ets.py here
$ python ets.py clone
在Python Shell中键入这些行会给我消息:"语法错误:语法无效"
正如你所看到的,我是Python的新手,我不知道我在做什么。 如何下载 ETS 脚本并运行命令?
最后这些命令并不意味着输入到 Python 控制台中,它们应该在终端 shell 中输入。
localhost-2:tmp $ mkdir ets
localhost-2:tmp $ cd ets
localhost-2:ets $ cp ../ets.py .
最后一个命令假定 ets.py 位于原始目录中。 现在我们可以运行它[编辑:确保您已安装git
,否则这将不起作用]:
localhost-2:ets $ python ets.py clone
Cloning package encore
URL: https://github.com/enthought/encore.git
Cloning into encore...
remote: Counting objects: 1081, done.
remote: Compressing objects: 100% (483/483), done.
remote: Total 1081 (delta 729), reused 942 (delta 592)
Receiving objects: 100% (1081/1081), 981.12 KiB | 1.80 MiB/s, done.
Resolving deltas: 100% (729/729), done.
Cloning package traits
URL: https://github.com/enthought/traits.git
Cloning into traits...
[etc.]
Cloning package etsproxy
URL: https://github.com/enthought/etsproxy.git
Cloning into etsproxy...
remote: Counting objects: 3577, done.
remote: Compressing objects: 100% (2243/2243), done.
remote: Total 3577 (delta 1053), reused 3571 (delta 1047)
Receiving objects: 100% (3577/3577), 369.81 KiB, done.
Resolving deltas: 100% (1053/1053), done.
在此之后,您需要安装所有内容(根据您的操作系统,这看起来会有所不同):
localhost-2:ets $ python ets.py develop
Running command ['/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', 'setup.py', 'develop'] in package encore
running develop
running egg_info
creating encore.egg-info
writing encore.egg-info/PKG-INFO
[long build process removed]