2013-11-01 2 views
0

패브릭 도구를 처음 사용하는데 이미 파이썬을 사용하고 있습니다. easy_install을 통해 fabric을 설치하려고 할 때 아래의 synctax 오류가 발생합니다.패브릭 (파이썬 모듈)이 리눅스 패브릭을 설치하려고 할 때 오류가 발생했습니다.

내 스크립트에 아무것도 변경 didnt는, 내가 패브릭 코드에 의해를 downloded과를 통해 설치하려고 sying하고 쉬운 설치 :

은 아래의 오류를 확인하고 난 더 이상 진행 방법 제안을주십시오.

[[email protected] ~]$ easy_install setup 
Searching for setup 
Reading https://pypi.python.org/simple/setup/ 
Couldn't find index page for 'setup' (maybe misspelled?) 
Scanning index of all packages (this may take a while) 
Reading https://pypi.python.org/simple/ 
No local packages or download links found for setup 
error: Could not find suitable distribution for Requirement.parse('setup') 
[[email protected] addr:113.128.177.237 ~]$ easy_install fabric 
Searching for fabric 
Reading https://pypi.python.org/simple/fabric/ 
Best match: Fabric 1.8.0 
Downloading https://pypi.python.org/packages/source/F/Fabric/Fabric-1.8.0.tar.gz#md5=1f195d16b05877767816617749d33eca 
Processing Fabric-1.8.0.tar.gz 
Writing /tmp/easy_install-PoxSe1/Fabric-1.8.0/setup.cfg 
Running Fabric-1.8.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-PoxSe1/Fabric-1.8.0/egg-dist-tmp-JzsXHn 
Traceback (most recent call last): 
    File "/usr/bin/easy_install", line 8, in ? 
    sys.exit(
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/command/easy_install.py", line 1925, in main 
    with_ei_usage(lambda: 
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/command/easy_install.py", line 1912, in with_ei_usage 
    return f() 
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/command/easy_install.py", line 1929, in <lambda> 
    distclass=DistributionWithoutHelpCommands, **kw 
    File "/usr/lib64/python2.4/distutils/core.py", line 149, in setup 
    dist.run_commands() 
    File "/usr/lib64/python2.4/distutils/dist.py", line 946, in run_commands 
    self.run_command(cmd) 
    File "/usr/lib64/python2.4/distutils/dist.py", line 966, in run_command 
    cmd_obj.run() 
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/command/easy_install.py", line 374, in run 
    self.easy_install(spec, not self.no_deps) 
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/command/easy_install.py", line 609, in easy_install 
    return self.install_item(spec, dist.location, tmpdir, deps) 
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/command/easy_install.py", line 639, in install_item 
    dists = self.install_eggs(spec, download, tmpdir) 
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/command/easy_install.py", line 825, in install_eggs 
    return self.build_and_install(setup_script, setup_base) 
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/command/easy_install.py", line 1031, in build_and_install 
    self.run_setup(setup_script, setup_base, args) 
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/command/easy_install.py", line 1016, in run_setup 
    run_setup(setup_script, args) 
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/sandbox.py", line 68, in run_setup 
    DirectorySandbox(setup_dir).run(
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/sandbox.py", line 120, in run 
    return func() 
    File "/usr/lib/python2.4/site-packages/setuptools-1.1.7-py2.4.egg/setuptools/sandbox.py", line 71, in <lambda> 
    {'__file__':setup_script, '__name__':'__main__'} 
    File "setup.py", line 7, in ? 
    File "/tmp/easy_install-PoxSe1/Fabric-1.8.0/fabric/version.py", line 57 
    sha1 = (" (%s)" % sha) if sha else "" 
          ^
SyntaxError: invalid syntax 

미리 감사드립니다.

+0

여기 좀보세요 http://stackoverflow.com/questions/17719348/executing-fabric-python-code-on-windows-7. – neo

답변

2

패브릭에는 파이썬 2.5 이상이 필요하며 2.4를 사용하고 있습니다. official docs

나이와 컨텍스트 관리자 및 새 모듈과 같은 Python 2.5의 유용한 도구의 수를 고려하지 않고 Python 2.4를 지원할 계획이 아닙니다. 즉, 2.5 특정 기능의 실제 양은 엄청나게 크지 않으며 우리는 타사 2.4 호환 포크로 연결되지만 지원하지는 않습니다. (현재로서는 해당 포크가 존재하지 않습니다.)

0

패브릭에는 Python 버전 2.5 또는 2.6이 필요합니다. Fabric은 아직 Python 3.x에서 테스트되지 않았으므로 해당 개발 라인과 호환되지 않을 수 있습니다.