我以非root用户身份安装了Python3.3,并使用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 本身的问题?