V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xiuc001
V2EX  ›  问与答

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

  •  
  •   xiuc001 · 2017-01-03 15:20:00 +08:00 · 3484 次点击
    这是一个创建于 2892 天前的主题,其中的信息可能已经有所发展或是发生改变。

    以下是具体的报错,请大家帮忙看下,到底是什么引起的。 "/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)
    
    1 条回复    2017-01-04 11:33:44 +08:00
    appleorchard2000
        1
    appleorchard2000  
       2017-01-04 11:33:44 +08:00
    是在测 sysexec 这个项目吧,那个 setup.py 应该就是这个项目的 setup.py ,之所以在 /tmp 那个位置,是个暂时的,在安装 sysexec 的时候才有,过后就删了。出错的意思是说 sysexec 这个项目的 setup.py 需要项目中有个 README 文件,可是没有。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3328 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 12:03 · PVG 20:03 · LAX 04:03 · JFK 07:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.