python-daemon安装失败

时间:2013-02-07 00:25:02

标签: python python-daemon

我安装了Python3.3作为非root用户,并使用python virtualenv中的pip来安装beaver,python模块依赖于python-daemon。但是安装失败,因为无法安装python-daemon。

(py_virtual)[infra@sulog01 beaver-master]$ pip install beaver==22
Downloading/unpacking beaver==22
  Downloading Beaver-22.tar.gz (40kB): 40kB downloaded
  Running setup.py egg_info for package beaver

Downloading/unpacking pika>=0.9.5 (from beaver==22)
  Downloading pika-0.9.9.tar.gz (56kB): 56kB downloaded
  Running setup.py egg_info for package pika

Downloading/unpacking python-daemon>=1.5.2 (from beaver==22)
  Downloading python-daemon-1.6.tar.gz (41kB): 41kB downloaded
  Running setup.py egg_info for package python-daemon
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/home/infra/logstash/beaver_Python/beaver-
            master/py_virtual/build/python-daemon/setup.py", line 22, in 
            <module>main_module = __import__(main_module_name, 
                fromlist=['version'])
      File "./daemon/__init__.py", line 42, in <module>
        from . import version
      File "./daemon/version/__init__.py", line 16, in <module>
        from .version_info import version_info
      File "./daemon/version/version_info.py", line 21
        print 'revision: %(revno)d' % version_info
                                  ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/home/infra/logstash/beaver_Python/beaver-master/
        py_virtual/build/python-daemon/setup.py", line 22, in <module>

    main_module = __import__(main_module_name, fromlist=['version'])

  File "./daemon/__init__.py", line 42, in <module>

    from . import version

  File "./daemon/version/__init__.py", line 16, in <module>

    from .version_info import version_info

  File "./daemon/version/version_info.py", line 21

    print 'revision: %(revno)d' % version_info

                              ^

SyntaxError: invalid syntax

----------------------------------------
Command python setup.py egg_info failed with error code 1 in 
    /home/infra/logstash/beaver_Python/beaver-master/py_virtual/
    build/python-daemon
Storing complete log in /home/infra/.pip/pip.log

在安装python-daemon之前是否需要安装其他任何东西?或者这是Python3.3本身的问题吗?

1 个答案:

答案 0 :(得分:2)

看起来beaver和python-daemon此时不支持Python 3。你必须使用Python 2.x。