python包管理:pip search "xxx" 为什么没有返回
python包管理:pip search "xxx" 为什么没有返回
pip search --index=http://pypi.douban.com/simple mysql-python
报错
Exception:
Traceback (most recent call last):
File "/home/www/test/duian/venv/lib/python2.6/site-packages/pip/basecommand.py", line 134, in main
status = self.run(options, args)
File "/home/www/test/duian/venv/lib/python2.6/site-packages/pip/commands/search.py", line 38, in run
pypi_hits = self.search(query, index_url)
File "/home/www/test/duian/venv/lib/python2.6/site-packages/pip/commands/search.py", line 52, in search
hits = pypi.search({'name': query, 'summary': query}, 'or')
File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
verbose=self.__verbose
File "/usr/lib64/python2.6/xmlrpclib.py", line 1243, in request
headers
ProtocolError: <ProtocolError for pypi.douban.com/simple: 301 Moved Permanently>
UP主怀孕了
11 years, 3 months ago
Answers
301错误是因为他们重定向到了 http://pypi.douban.com/simple/ ,所以
pip search --index=http://pypi.douban.com/simple/ mysql-python
是可以过了这个错误的,不过这是会遇到另外一个xml解析错误,是因为他们列表的最后一行
<a href=""Coversation With Your Car"/">"Coversation With Your Car"</a><br/>
因为"和/的关系转义错了
落とし神-xi
answered 11 years, 3 months ago