python 项目使用 tox 测试,遇到下面的问题,求 v 友帮忙

2017-01-03 15:20:00 +08:00
 xiuc001

以下是具体的报错,请大家帮忙看下,到底是什么引起的。 "/private/tmp/pip-YHjloA-build/setup.py"这个文件夹是干什么用的,我系统里面找不到,怎么生成的?

➜  sysexec git:(master) sudo tox
Password:
GLOB sdist-make: /Users/xiuc/Documents/work/sysexec/setup.py
py26 inst-nodeps: /Users/xiuc/Documents/work/sysexec/.tox/dist/xiuc-1.0.0.zip
ERROR: invocation failed (exit code 1), logfile: /Users/xiuc/Documents/work/sysexec/.tox/py26/log/py26-57.log
ERROR: actionid: py26
msg: installpkg
cmdargs: ['/Users/xiuc/Documents/work/sysexec/.tox/py26/bin/pip', 'install', '-U', '--no-deps', '/Users/xiuc/Documents/work/sysexec/.tox/dist/xiuc-1.0.0.zip']
env: {'VERSIONER_PYTHON_PREFER_32_BIT': 'no', 'LC_CTYPE': 'zh_CN.UTF-8', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/Users/xiuc/Documents/work/sysexec/.tox/py26/bin:/Users/xiuc/Documents/java/apache-maven-3.2.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/xiuc/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin:/Users/xiuc/Documents/java/gradle-2.12/bin:/Users/xiuc/Documents/java/btrace-bin/bin:/usr/local/mysql/bin', 'HOME': '/Users/xiuc', 'LANG': 'en_US.UTF-8', 'TERM': 'xterm-256color', 'SHELL': '/bin/zsh', 'VERSIONER_PYTHON_VERSION': '2.7', 'PYTHONHASHSEED': '402642246', 'SUDO_USER': 'xiuc', 'USERNAME': 'root', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.jfXwpk5W4d/Listeners', 'SUDO_UID': '501', 'VIRTUAL_ENV': '/Users/xiuc/Documents/work/sysexec/.tox/py26', 'LC_ALL': 'en_US.UTF-8', 'SUDO_COMMAND': '/usr/local/bin/tox', 'SUDO_GID': '20', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', '__CF_USER_TEXT_ENCODING': '0x0:25:52', 'MAIL': '/var/mail/root'}

DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Processing ./.tox/dist/xiuc-1.0.0.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-LxosAd-build/setup.py", line 19, in <module>
        with open(path.join(here, 'README.md'), encoding='utf-8') as f:
      File "/Users/xiuc/Documents/work/sysexec/.tox/py26/lib/python2.6/codecs.py", line 881, in open
        file = __builtin__.open(filename, mode, buffering)
    IOError: [Errno 2] No such file or directory: '/private/tmp/pip-LxosAd-build/README.md'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-LxosAd-build/

py26 installed: DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6,argparse==1.4.0,meld3==1.0.2,py==1.4.32,pytest==3.0.5,supervisor==3.3.1,xiuc==1.0.0
py27 inst-nodeps: /Users/xiuc/Documents/work/sysexec/.tox/dist/xiuc-1.0.0.zip
ERROR: invocation failed (exit code 1), logfile: /Users/xiuc/Documents/work/sysexec/.tox/py27/log/py27-56.log
ERROR: actionid: py27
msg: installpkg
cmdargs: ['/Users/xiuc/Documents/work/sysexec/.tox/py27/bin/pip', 'install', '-U', '--no-deps', '/Users/xiuc/Documents/work/sysexec/.tox/dist/xiuc-1.0.0.zip']
env: {'VERSIONER_PYTHON_PREFER_32_BIT': 'no', 'LC_CTYPE': 'zh_CN.UTF-8', 'LOGNAME': 'root', 'USER': 'root', 'PATH': '/Users/xiuc/Documents/work/sysexec/.tox/py27/bin:/Users/xiuc/Documents/java/apache-maven-3.2.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/xiuc/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin:/Users/xiuc/Documents/java/gradle-2.12/bin:/Users/xiuc/Documents/java/btrace-bin/bin:/usr/local/mysql/bin', 'HOME': '/Users/xiuc', 'LANG': 'en_US.UTF-8', 'TERM': 'xterm-256color', 'SHELL': '/bin/zsh', 'VERSIONER_PYTHON_VERSION': '2.7', 'PYTHONHASHSEED': '402642246', 'SUDO_USER': 'xiuc', 'USERNAME': 'root', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.jfXwpk5W4d/Listeners', 'SUDO_UID': '501', 'VIRTUAL_ENV': '/Users/xiuc/Documents/work/sysexec/.tox/py27', 'LC_ALL': 'en_US.UTF-8', 'SUDO_COMMAND': '/usr/local/bin/tox', 'SUDO_GID': '20', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', '__CF_USER_TEXT_ENCODING': '0x0:25:52', 'MAIL': '/var/mail/root'}

Processing ./.tox/dist/xiuc-1.0.0.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-YHjloA-build/setup.py", line 19, in <module>
        with open(path.join(here, 'README.md'), encoding='utf-8') as f:
      File "/Users/xiuc/Documents/work/sysexec/.tox/py27/lib/python2.7/codecs.py", line 884, in open
        file = __builtin__.open(filename, mode, buffering)
    IOError: [Errno 2] No such file or directory: '/private/tmp/pip-YHjloA-build/README.md'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-YHjloA-build/

py27 installed: meld3==1.0.2,py==1.4.32,pytest==3.0.5,supervisor==3.3.1,xiuc==1.0.0
______________________________________________________________________________________________________________________________ summary ______________________________________________________________________________________________________________________________
ERROR:   py26: InvocationError: /Users/xiuc/Documents/work/sysexec/.tox/py26/bin/pip install -U --no-deps /Users/xiuc/Documents/work/sysexec/.tox/dist/xiuc-1.0.0.zip (see /Users/xiuc/Documents/work/sysexec/.tox/py26/log/py26-57.log)
ERROR:   py27: InvocationError: /Users/xiuc/Documents/work/sysexec/.tox/py27/bin/pip install -U --no-deps /Users/xiuc/Documents/work/sysexec/.tox/dist/xiuc-1.0.0.zip (see /Users/xiuc/Documents/work/sysexec/.tox/py27/log/py27-56.log)
3286 次点击
所在节点    问与答
1 条回复
appleorchard2000
2017-01-04 11:33:44 +08:00
是在测 sysexec 这个项目吧,那个 setup.py 应该就是这个项目的 setup.py ,之所以在 /tmp 那个位置,是个暂时的,在安装 sysexec 的时候才有,过后就删了。出错的意思是说 sysexec 这个项目的 setup.py 需要项目中有个 README 文件,可是没有。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/331915

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX