2016-04-29 52 views
3

我試圖在回購克隆我已經運行tox,但得到這個錯誤:在一個回購克隆弓形蟲運行良好,但沒有其他

[email protected] /data/Dropbox/Forks do GitHub/fastkml $ sudo tox 
GLOB sdist-make: /data/Dropbox/Forks do GitHub/fastkml/setup.py 
py27 create: /data/Dropbox/Forks do GitHub/fastkml/.tox/py27 
py27 installdeps: pytest, coverage 
ERROR: invocation failed (errno 2), args: [local('/data/Dropbox/Forks do GitHub/fastkml/.tox/py27/bin/pip'), 'install', 'pytest', 'coverage'], cwd: /data/Dropbox/Forks do GitHub/fastkml 
Traceback (most recent call last): 
    File "/usr/local/bin/tox", line 11, in <module> 
    sys.exit(cmdline()) 
    File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 39, in main 
    retcode = Session(config).runcommand() 
    File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 375, in runcommand 
    return self.subcommand_test() 
    File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 526, in subcommand_test 
    if self.setupenv(venv): 
    File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 434, in setupenv 
    status = venv.update(action=action) 
    File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 153, in update 
    self.hook.tox_testenv_install_deps(action=action, venv=self) 
    File "/usr/local/lib/python2.7/dist-packages/pluggy.py", line 724, in __call__ 
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) 
    File "/usr/local/lib/python2.7/dist-packages/pluggy.py", line 338, in _hookexec 
    return self._inner_hookexec(hook, methods, kwargs) 
    File "/usr/local/lib/python2.7/dist-packages/pluggy.py", line 333, in <lambda> 
    _MultiCall(methods, kwargs, hook.spec_opts).execute() 
    File "/usr/local/lib/python2.7/dist-packages/pluggy.py", line 596, in execute 
    res = hook_impl.function(*args) 
    File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 401, in tox_testenv_install_deps 
    venv._install(deps, action=action) 
    File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 284, in _install 
    action=action) 
    File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 257, in run_install_command 
    self._pcall(argv, cwd=self.envconfig.config.toxinidir, action=action) 
    File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 362, in _pcall 
    redirect=redirect, ignore_ret=ignore_ret) 
    File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 136, in popen 
    stdout=stdout, stderr=STDOUT) 
    File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 224, in _popen 
    stdout=stdout, stderr=stderr, env=env) 
    File "/usr/lib/python2.7/subprocess.py", line 710, in __init__ 
    errread, errwrite) 
    File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child 
    raise child_exception 
OSError: [Errno 2] No such file or directory 

但是,當我克隆回購到其他位置,它的工作:

> cd ~/Desktop 
> git clone http://github.com/heltonbiker/fastkml 
> cd fastkml 
> tox 

我使用Linux Mint的17.3 64位與sudo pip install tox安裝包括蟒蛇2.7.6和TOX。

回答

1

晚會有點晚,但問題不是直接關係到毒素。

這個問題 - 它可能聽起來多麼微不足道 - 是,你的項目路徑包含空格。其他的克隆可能不包含空格,因此沒有任何問題:

ERROR: invocation failed (errno 2), args: [local('/data/Dropbox/Forks do GitHub/[...] 

這是一個長期存在的問題有類似的virtualenv和點子上游的工具。儘管這些問題大部分都會在pip 10發佈的時候得到解決。見pip does not support spaces in directories names

我們還TOX跟蹤此位置:https://github.com/tox-dev/tox/issues/121

由於2.8,我們至少可以給一些更有幫助的錯誤,當發生這種情況:https://github.com/tox-dev/tox/pull/556