我正在尝试从 django 项目的需求文件中安装软件包。
问题是在安装 geopy 时出现错误 AttributeError: 'NoneType' object has no attribute 'split'。
我在带有 python 2.7.3 的 virtualenv 中运行。
确切的命令是:
sudo pip-python install -r requirements.pip
需求文件中的问题行是:
-e svn+http://geopy.googlecode.com/svn/trunk@144#egg=geopy-0.94.1_pre.dev_r144-py2.7-dev_r144
我有 setuptools 并分发 0.6.34(我相信 setuptools 只是分发的别名)。setuptools_subversion 是 3.1 版
我正在运行 Fedora 17。
完整的错误如下:
Obtaining geopy from svn+http://geopy.googlecode.com/svn/trunk@144#egg=geopy-0.94.1_pre.dev_r144-py2.7-dev_r144 (from -r requirements.pip (line 50))
Unrecognized .svn/entries format in /home/myself/leona-integration/leona/src/geopy
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/site-packages/pip/req.py", line 936, in prepare_files
req_to_install.update_editable(not self.is_download)
File "/usr/lib/python2.7/site-packages/pip/req.py", line 384, in update_editable
vcs_backend.obtain(self.source_dir)
File "/usr/lib/python2.7/site-packages/pip/vcs/subversion.py", line 86, in obtain
if self.check_destination(dest, url, rev_options, rev_display):
File "/usr/lib/python2.7/site-packages/pip/vcs/__init__.py", line 184, in check_destination
if self.compare_urls(existing_url, url):
File "/usr/lib/python2.7/site-packages/pip/vcs/__init__.py", line 142, in compare_urls
return (self.normalize_url(url1) == self.normalize_url(url2))
File "/usr/lib/python2.7/site-packages/pip/vcs/__init__.py", line 136, in normalize_url
return urllib.unquote(url).rstrip('/')
File "/usr/lib64/python2.7/urllib.py", line 1204, in unquote
res = s.split('%')
AttributeError: 'NoneType' object has no attribute 'split'
Storing complete log in /root/.pip/pip.log
评论中已经指出,“Unrecognized .svn/entries format in...”这一行只是一个警告,而不是异常的原因。