我正在为一个项目设置 Fabric/virtualenv/pip 自动化部署,并且需要安装 python-couchdb 的最新实验分支。当然,我将其粘贴在我的 pip 需求文件中,如下所示:

-e svn+http://couchdb-python.googlecode.com/svn/branches/experimental/httplib@195#egg=CouchDB-dev_r195

但是,当我运行部署时,我收到以下错误和回溯:

[192.168.1.200] out: Obtaining CouchDB from svn+http://couchdb-python.googlecode.com/svn/branches/experimental/httplib/#egg=CouchDB (from -r requirements.txt (line 1))
[192.168.1.200] out:   Checking out http://couchdb-python.googlecode.com/svn/branches/experimental/httplib/ to ./src/couchdb
[192.168.1.200] out:   Error [Errno 2] No such file or directory while executing command svn checkout -q http://couchdb-python.googlecode.com/svn/branches/experimental/httplib/ /home/sk/votersdaily/src/couchdb
[192.168.1.200] out: Exception:
[192.168.1.200] out: Traceback (most recent call last):
[192.168.1.200] out:   File "/usr/local/lib/python2.6/dist-packages/pip-0.6.1-py2.6.egg/pip.py", line 482, in main
[192.168.1.200] out:     self.run(options, args)
[192.168.1.200] out:   File "/usr/local/lib/python2.6/dist-packages/pip-0.6.1-py2.6.egg/pip.py", line 675, in run
[192.168.1.200] out:     requirement_set.install_files(finder, force_root_egg_info=self.bundle)
[192.168.1.200] out:   File "/usr/local/lib/python2.6/dist-packages/pip-0.6.1-py2.6.egg/pip.py", line 2409, in install_files
[192.168.1.200] out:     req_to_install.update_editable(not self.is_download)
[192.168.1.200] out:   File "/usr/local/lib/python2.6/dist-packages/pip-0.6.1-py2.6.egg/pip.py", line 1970, in update_editable
[192.168.1.200] out:     vcs_backend.obtain(self.source_dir)
[192.168.1.200] out:   File "/usr/local/lib/python2.6/dist-packages/pip-0.6.1-py2.6.egg/pip.py", line 3420, in obtain
[192.168.1.200] out:     ['svn', 'checkout', '-q'] + rev_options + [url, dest])
[192.168.1.200] out:   File "/usr/local/lib/python2.6/dist-packages/pip-0.6.1-py2.6.egg/pip.py", line 4320, in call_subprocess
[192.168.1.200] out:     cwd=cwd, env=env)
[192.168.1.200] out:   File "/usr/lib/python2.6/subprocess.py", line 621, in __init__
[192.168.1.200] out:     errread, errwrite)
[192.168.1.200] out:   File "/usr/lib/python2.6/subprocess.py", line 1126, in _execute_child
[192.168.1.200] out:     raise child_exception
[192.168.1.200] out: OSError: [Errno 2] No such file or directory

这是我所知道的:

  • 该错误与找不到 setup.py 有关,因为这些文件从未下载。它似乎拒绝创建路径 /home/sk/votersdaily/src/couchdb,但对于其他包,它始终根据需要创建此路径。
  • 我可以以 root 身份运行,也可以以本地用户身份运行,但同样失败。
  • 如果我手动创建该目录,它会提示我该目录当前不是 SVN 存储库,并询问我是否要覆盖它。如果我将其清除,它仍然不会签出存储库。
  • 我已经重新安装了 pip 并重新创建了 virtualenv,并且重现了该错误。
  • 我可以在本地工作站(在 virtualenv 中)成功执行此 pip 安装。

建议?我知道这一定是某种库或权限冲突,但我似乎无法确定它,

谢谢。

有帮助吗?

解决方案

根据 John Paulett 的评论——您确实必须在服务器上安装 subversion 才能在服务器上执行它。

如果可能的话,我希望将送到我脸上的鸡蛋冷藏。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top