发起问题

Revision history [back]

click to hide/show revision 1
初始版本

在本地环境下keystone用tox进行pep8代码检测时报错(新手求教)

系统ubuntu kylink15.04 本地环境根据官方文档http://docs.openstack.org/developer/keystone/setup.html进行配置 当运行tox -e pep8 keystone/tests/test_v3_policy.py命令时出错,下面时错误日志: 系统ubuntu kylink15.04 本地环境根据官方文档http://docs.openstack.org/developer/keystone/setup.html进行配置 当运行tox -e pep8 keystone/tests/test_v3_policy.py命令时出错,下面时错误日志: (.venv)root@scorpio-Inspiron-5537:/home/openstack/keystone# tox -e pep8 keystone/tests/unit/test_v3_controller.py pep8 create: /home/openstack/keystone/.tox/pep8 pep8 installdeps: -r/home/openstack/keystone/requirements.txt, -r/home/openstack/keystone/test-requirements.txt ERROR: invocation failed, logfile: /home/openstack/keystone/.tox/pep8/log/pep8-1.log ERROR: actionid=pep8 msg=getenv cmdargs=[local('/home/openstack/keystone/.tox/pep8/bin/pip'), 'install', '-U', '-r/home/openstack/keystone/requirements.txt', '-r/home/openstack/keystone/test-requirements.txt'] env={'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session0', '_': '/usr/bin/tox', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'XMODIFIERS': '@im=fcitx', 'DEFAULTS_PATH': '/usr/share/gconf/ubuntu.default.path', 'QT4_IM_MODULE': 'fcitx', 'GTK_IM_MODULE': 'fcitx', 'XDG_SESSION_DESKTOP': 'ubuntu', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'HOME': '/root', 'USER': 'root', 'INSTANCE': 'Unity', 'LANG': 'zh_CN.UTF-8', 'XDG_SESSION_ID': 'c2', 'UPSTART_EVENTS': 'started starting', 'XDG_DATA_DIRS': '/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/', 'PS1': '(.venv)\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ', 'UPSTART_JOB': 'unity-settings-daemon', 'SHELL': '/bin/bash', 'JAVA_TOOL_OPTIONS': '-javaagent:/usr/share/java/jayatanaag.jar ', 'LOGNAME': 'root', 'XAUTHORITY': '/root/.Xauthority', 'PATH': '/home/openstack/keystone/.tox/pep8/bin:/home/openstack/keystone/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games', 'QT_QPA_PLATFORMTHEME': 'appmenu-qt5', 'XDG_VTNR': '7', 'UPSTART_SESSION': 'unix:abstract=/com/ubuntu/upstart-session/0/1736', 'DESKTOP_SESSION': 'ubuntu', 'VIRTUAL_ENV': '/home/openstack/keystone/.tox/pep8', 'XDG_SEAT': 'seat0', 'GNOME_KEYRING_PID': '', 'PWD': '/home/openstack/keystone', 'XDG_SESSION_TYPE': 'x11', 'GDMSESSION': 'ubuntu', 'WINDOWID': '75497483', 'JOB': 'gnome-session', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:.xspf=00;36:', 'XDG_GREETER_DATA_DIR': '/var/lib/lightdm-data/root', 'COMPIZ_CONFIG_PROFILE': 'ubuntu', 'LANGUAGE': 'zh_CN:zh', 'XDG_CURRENT_DESKTOP': 'Unity', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'XDG_RUNTIME_DIR': '/run/user/0', 'SHLVL': '1', 'DISPLAY': ':0', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg', 'UPSTART_INSTANCE': '', 'GPG_AGENT_INFO': '/run/user/0/keyring/gpg:0:1', 'QT_IM_MODULE': 'fcitx', 'OLDPWD': '/home/openstack/keystone/keystone', 'SSH_AUTH_SOCK': '/run/user/0/keyring/ssh', 'PYTHONHASHSEED': '85750798', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-Il4265RpMG', 'VTE_VERSION': '3803', 'GNOME_KEYRING_CONTROL': '', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0', 'MANDATORY_PATH': '/usr/share/gconf/ubuntu.mandatory.path', 'GTK_MODULES': 'overlay-scrollbar:unity-gtk-module', 'TERM': 'xterm', 'SESSIONTYPE': 'gnome-session'} Downloading/unpacking pbr<2.0,>=0.11 (from -r /home/openstack/keystone/requirements.txt (line 5)) Downloading/unpacking WebOb>=1.2.3 (from -r /home/openstack/keystone/requirements.txt (line 6)) Running setup.py (path:/tmp/pip-build-ylmp3irb/WebOb/setup.py) egg_info for package WebOb

no previously-included directories found matching '*.pyc'
no previously-included directories found matching '*.pyo'

Downloading/unpacking eventlet>=0.17.3 (from -r /home/openstack/keystone/requirements.txt (line 7)) Downloading/unpacking greenlet>=0.3.2 (from -r /home/openstack/keystone/requirements.txt (line 8)) Running setup.py (path:/tmp/pip-build-ylmp3irb/greenlet/setup.py) egg_info for package greenlet

Downloading/unpacking netaddr>=0.7.12 (from -r /home/openstack/keystone/requirements.txt (line 9)) Downloading/unpacking PasteDeploy>=1.5.0 (from -r /home/openstack/keystone/requirements.txt (line 10)) Downloading PasteDeploy-1.5.2-py2.py3-none-any.whl Downloading/unpacking Paste (from -r /home/openstack/keystone/requirements.txt (line 11)) Downloading/unpacking Routes!=2.0,>=1.12.3 (from -r /home/openstack/keystone/requirements.txt (line 12)) Running setup.py (path:/tmp/pip-build-ylmp3irb/Routes/setup.py) egg_info for package Routes

warning: no previously-included files matching '.DS_Store' found anywhere in distribution
warning: no previously-included files matching '*.hgignore' found anywhere in distribution
warning: no previously-included files matching '*.hgtags' found anywhere in distribution

Downloading/unpacking cryptography>=0.8.2 (from -r /home/openstack/keystone/requirements.txt (line 13)) Running setup.py (path:/tmp/pip-build-ylmp3irb/cryptography/setup.py) egg_info for package cryptography

no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'

Downloading/unpacking six>=1.9.0 (from -r /home/openstack/keystone/requirements.txt (line 14)) Downloading six-1.9.0-py2.py3-none-any.whl Downloading/unpacking SQLAlchemy<=0.9.99,>=0.9.7 (from -r /home/openstack/keystone/requirements.txt (line 15)) Running setup.py (path:/tmp/pip-build-ylmp3irb/SQLAlchemy/setup.py) egg_info for package SQLAlchemy

warning: no files found matching '*.jpg' under directory 'doc'
warning: no files found matching '*.mako' under directory 'doc'
warning: no files found matching 'distribute_setup.py'
warning: no files found matching 'sa2to3.py'
warning: no files found matching 'ez_setup.py'
no previously-included directories found matching 'doc/build/output'

Downloading/unpacking sqlalchemy-migrate>=0.9.5 (from -r /home/openstack/keystone/requirements.txt (line 16)) Running setup.py (path:/tmp/pip-build-ylmp3irb/sqlalchemy-migrate/setup.py) egg_info for package sqlalchemy-migrate

Installed /tmp/pip-build-ylmp3irb/sqlalchemy-migrate/.eggs/pbr-1.2.0-py3.4.egg
[pbr] Processing SOURCES.txt
/home/openstack/keystone/.tox/pep8/lib/python3.4/site-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'pbr (0.5.2.5.g5b3e942)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,
warning: LocalManifestMaker: standard file '-c' not found

warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no files found matching 'README'
warning: no files found matching '*' under directory 'docs'
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*' found under directory 'docs/_build'

Downloading/unpacking stevedore>=1.3.0 (from -r /home/openstack/keystone/requirements.txt (line 17)) Downloading stevedore-1.5.0-py2.py3-none-any.whl Downloading/unpacking passlib (from -r /home/openstack/keystone/requirements.txt (line 18)) Running setup.py (path:/tmp/pip-build-ylmp3irb/passlib/setup.py) egg_info for package passlib

Downloading/unpacking iso8601>=0.1.9 (from -r /home/openstack/keystone/requirements.txt (line 19)) Downloading iso8601-0.1.10-py33-none-any.whl Downloading/unpacking python-keystoneclient>=1.3.0 (from -r /home/openstack/keystone/requirements.txt (line 20)) Downloading/unpacking keystonemiddleware>=1.5.0 (from -r /home/openstack/keystone/requirements.txt (line 21)) Downloading/unpacking oslo.concurrency>=1.8.0 (from -r /home/openstack/keystone/requirements.txt (line 22)) Downloading oslo.concurrency-2.0.0-py2.py3-none-any.whl Downloading/unpacking oslo.config>=1.11.0 (from -r /home/openstack/keystone/requirements.txt (line 23)) Downloading/unpacking oslo.messaging>=1.8.0 (from -r /home/openstack/keystone/requirements.txt (line 24)) Running setup.py (path:/tmp/pip-build-ylmp3irb/oslo.messaging/setup.py) egg_info for package oslo.messaging

Installed /tmp/pip-build-ylmp3irb/oslo.messaging/.eggs/pbr-1.2.0-py3.4.egg
[pbr] Processing SOURCES.txt
/home/openstack/keystone/.tox/pep8/lib/python3.4/site-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'pbr (0.5.2.5.g5b3e942)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,
warning: LocalManifestMaker: standard file '-c' not found

warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution

Downloading/unpacking oslo.db>=1.7.0 (from -r /home/openstack/keystone/requirements.txt (line 25)) Running setup.py (path:/tmp/pip-build-ylmp3irb/oslo.db/setup.py) egg_info for package oslo.db

Installed /tmp/pip-build-ylmp3irb/oslo.db/.eggs/pbr-1.2.0-py3.4.egg
[pbr] Processing SOURCES.txt
/home/openstack/keystone/.tox/pep8/lib/python3.4/site-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'pbr (0.5.2.5.g5b3e942)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,
warning: LocalManifestMaker: standard file '-c' not found

warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution

Downloading/unpacking oslo.i18n>=1.5.0 (from -r /home/openstack/keystone/requirements.txt (line 26)) Downloading oslo.i18n-1.7.0-py2.py3-none-any.whl Downloading/unpacking oslo.log>=1.0.0 (from -r /home/openstack/keystone/requirements.txt (line 27)) Downloading oslo.log-1.4.0-py2.py3-none-any.whl Downloading/unpacking oslo.middleware>=1.2.0 (from -r /home/openstack/keystone/requirements.txt (line 28)) Downloading oslo.middleware-2.1.0-py2.py3-none-any.whl Downloading/unpacking oslo.policy>=0.3.1 (from -r /home/openstack/keystone/requirements.txt (line 29)) Downloading oslo.policy-0.6.0-py2.py3-none-any.whl Downloading/unpacking oslo.serialization>=1.4.0 (from -r /home/openstack/keystone/requirements.txt (line 30)) Downloading oslo.serialization-1.6.0-py2.py3-none-any.whl Downloading/unpacking oslo.utils>=1.4.0 (from -r /home/openstack/keystone/requirements.txt (line 31)) Downloading/unpacking oauthlib>=0.6 (from -r /home/openstack/keystone/requirements.txt (line 32)) Running setup.py (path:/tmp/pip-build-ylmp3irb/oauthlib/setup.py) egg_info for package oauthlib

Downloading/unpacking pysaml2 (from -r /home/openstack/keystone/requirements.txt (line 33)) Running setup.py (path:/tmp/pip-build-ylmp3irb/pysaml2/setup.py) egg_info for package pysaml2

Downloading/unpacking dogpile.cache>=0.5.3 (from -r /home/openstack/keystone/requirements.txt (line 34)) Running setup.py (path:/tmp/pip-build-ylmp3irb/dogpile.cache/setup.py) egg_info for package dogpile.cache

warning: no files found matching '*.jpg' under directory 'docs'
warning: no files found matching '*.sty' under directory 'docs'
warning: no files found matching '*.dat' under directory 'tests'
warning: no files found matching 'distribute_setup.py'
warning: no files found matching 'CHANGES*'
warning: no files found matching 'test.cfg'
no previously-included directories found matching 'docs/build/output'

Downloading/unpacking jsonschema<3.0.0,>=2.0.0 (from -r /home/openstack/keystone/requirements.txt (line 35)) Downloading jsonschema-2.5.1-py2.py3-none-any.whl Downloading/unpacking pycadf>=0.8.0 (from -r /home/openstack/keystone/requirements.txt (line 36)) Running setup.py (path:/tmp/pip-build-ylmp3irb/pycadf/setup.py) egg_info for package pycadf

Installed /tmp/pip-build-ylmp3irb/pycadf/.eggs/pbr-1.2.0-py3.4.egg
[pbr] Processing SOURCES.txt
/home/openstack/keystone/.tox/pep8/lib/python3.4/site-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'pbr (0.5.2.5.g5b3e942)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,
warning: LocalManifestMaker: standard file '-c' not found

warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution

Downloading/unpacking posix-ipc (from -r /home/openstack/keystone/requirements.txt (line 37)) Running setup.py (path:/tmp/pip-build-ylmp3irb/posix-ipc/setup.py) egg_info for package posix-ipc

Downloading/unpacking msgpack-python>=0.4.0 (from -r /home/openstack/keystone/requirements.txt (line 38)) Running setup.py (path:/tmp/pip-build-ylmp3irb/msgpack-python/setup.py) egg_info for package msgpack-python

Downloading/unpacking hacking<0.11,>=0.10.0 (from -r /home/openstack/keystone/test-requirements.txt (line 5)) Downloading hacking-0.10.2-py2.py3-none-any.whl Downloading/unpacking bashate>=0.2 (from -r /home/openstack/keystone/test-requirements.txt (line 6)) Downloading bashate-0.3.1.tar.gz Running setup.py (path:/tmp/pip-build-ylmp3irb/bashate/setup.py) egg_info for package bashate

Installed /tmp/pip-build-ylmp3irb/bashate/.eggs/pbr-1.2.0-py3.4.egg
[pbr] Processing SOURCES.txt
/home/openstack/keystone/.tox/pep8/lib/python3.4/site-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'pbr (0.5.2.5.g5b3e942)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
  PEP440Warning,
warning: LocalManifestMaker: standard file '-c' not found

warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files found matching '.gitignore'
warning: no previously-included files found matching '.gitreview'
warning: no previously-included files matching '*.pyc' found anywhere in distribution

Downloading/unpacking python-memcached>=1.48 (from -r /home/openstack/keystone/test-requirements.txt (line 9)) Downloading python_memcached-1.54-py2.py3-none-any.whl Downloading/unpacking pymongo>=2.6.3 (from -r /home/openstack/keystone/test-requirements.txt (line 12)) Running setup.py (path:/tmp/pip-build-ylmp3irb/pymongo/setup.py) egg_info for package pymongo

Downloading/unpacking python-ldap>=2.4 (from -r /home/openstack/keystone/test-requirements.txt (line 16)) Running setup.py (path:/tmp/pip-build-ylmp3irb/python-ldap/setup.py) egg_info for package python-ldap Traceback (most recent call last): File "<string>", line 17, in <module> File "/tmp/pip-build-ylmp3irb/python-ldap/setup.py", line 53 print name + ': ' + cfg.get('_ldap', name) ^ SyntaxError: invalid syntax Complete output from command python setup.py egg_info: Traceback (most recent call last):

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

File "/tmp/pip-build-ylmp3irb/python-ldap/setup.py", line 53

print name + ': ' + cfg.get('_ldap', name)

         ^

SyntaxError: invalid syntax


Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-ylmp3irb/python-ldap Storing debug log for failure in /root/.pip/pip.log

ERROR: could not install deps [-r/home/openstack/keystone/requirements.txt, -r/home/openstack/keystone/test-requirements.txt]; v = InvocationError('/home/openstack/keystone/.tox/pep8/bin/pip install -U -r/home/openstack/keystone/requirements.txt -r/home/openstack/keystone/test-requirements.txt (see /home/openstack/keystone/.tox/pep8/log/pep8-1.log)', 1) _______________________________________________________________________ summary _______________________________________________________________________ ERROR: pep8: could not install deps [-r/home/openstack/keystone/requirements.txt, -r/home/openstack/keystone/test-requirements.txt]; v = InvocationError('/home/openstack/keystone/.tox/pep8/bin/pip install -U -r/home/openstack/keystone/requirements.txt -r/home/openstack/keystone/test-requirements.txt (see /home/openstack/keystone/.tox/pep8/log/pep8-1.log)', 1)