2014-02-20 143 views
0

我試圖從教程here(我試圖做標準安裝)在windows上安裝pyjaco,我做了:從cmd,git clone https://github.com/chrivers/pyjaco,然後我cd pyjaco。接下來,我做了python setup.py install它給了我這個錯誤:'python' is not recognized as a internal or external command, operable program or batch file。所以,我在IDLE打開文件瀏覽器,並打開setup.py:嘗試安裝pyjaco時出錯

from distutils.core import setup 
try: 
     from setuptools import setup 
except: 
     pass 

setup(
    name = "pyjaco", 
    version = "1.0.0", 
    author = "Pyjaco development team", 
    author_email = "[email protected]", 
    description = ("Python to JavaScript translator"), 
    scripts = ["pyjs.py"], 
    url = "http://pyjaco.org", 
    keywords = "python javascript translator compiler", 
    packages=["pyjaco", "pyjaco.compiler"], 
    package_data={"pyjaco": ["stdlib/*.js"]} 
) 

我得到這個錯誤,當我運行它,在Python外殼:

Traceback (most recent call last): 
    File "C:\Users\iFunny\pyjaco\setup.py", line 17, in <module> 
    package_data={"pyjaco": ["stdlib/*.js"]} 
    File "C:\Program Files (x86)\python32\lib\distutils\core.py", line 137, in setup 
    raise SystemExit(gen_usage(dist.script_name) + "\nerror: %s" % msg) 
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ... 
] 
    or: setup.py --help [cmd1 cmd2 ...] 
    or: setup.py --help-commands 
    or: setup.py cmd --help 

error: no commands supplied 

我相信這是distutils.core進口錯誤,因爲:\python32\lib\distutils\core.py

我做了一點點googleing,發現我需要運行ez_setup.py(你可以找到它here)。 所以我運行它,並在它安裝的C:\ Program Files文件(x86)\ python32 \ Lib \ site-packages:

setuptools-2.2-py3.2.egg,setuptools.pth,並且易於安裝。 PTH。我怎樣才能得到這個安裝正確?

+0

只需運行pip即可安裝pyjaco。 – TheCreator232

+0

in cmd ..同樣的事情:pip沒有被識別 – user3299661

回答

0

安裝任何python模塊的最直接的方法是使用pip或easy_install。 pip install pyjaco

所以,首先你需要安裝點子。要安裝pip,請運行此處提供的python腳本:get-pip.py

我也嘗試通過下載tar文件並運行setup.py來安裝它,它運行得非常完美。

enter image description here