Python:2.7.12
Pip:8.1.1
当我sudo pip install pandas
时,它显示如下:
例外:
追踪(最近一次呼叫最后一次):
文件" /usr/lib/python2.7/dist-packages/pip/basecommand.py" ;,第209行,主要
status = self.run(options,args)
文件" /usr/lib/python2.7/dist-packages/pip/commands/install.py" ;,第317行,在运行中
requirement_set.prepare_files(取景器)
文件" /usr/lib/python2.7/dist-packages/pip/req/req_set.py",第360行,在prepare_files中
ignore_dependencies = self.ignore_dependencies))
文件" /usr/lib/python2.7/dist-packages/pip/req/req_set.py",第512行,在_prepare_file中
finder,self.upgrade,require_hashes)
文件" /usr/lib/python2.7/dist-packages/pip/req/req_install.py",第273行,在populate_link中
self.link = finder.find_requirement(self,upgrade)
文件" /usr/lib/python2.7/dist-packages/pip/index.py",第442行,在find_requirement中
all_candidates = self.find_all_candidates(req.name)
文件" /usr/lib/python2.7/dist-packages/pip/index.py",第400行,在find_all_candidates中
for self._get_pages(url_locations,project_name)中的页面:
文件" /usr/lib/python2.7/dist-packages/pip/index.py",第545行,_get_pages
page = self._get_page(location) 文件" /usr/lib/python2.7/dist-packages/pip/index.py",第648行,在_get_page
返回HTMLPage.get_page(link,session = self.session)
文件" /usr/lib/python2.7/dist-packages/pip/index.py",第757行,在get_page中
" Cache-Control":" max-age = 600",
文件" /usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py" ;,第480行,获取
返回self.request(' GET',url,** kwargs)
文件" /usr/lib/python2.7/dist-packages/pip/download.py",第378行,请求
返回super(PipSession,self).request(方法,url,* args,** kwargs)
文件" /usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py",第468行,请求
resp = self.send(prep,** send_kwargs)
文件" /usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py",第576行,发送
r = adapter.send(request,** kwargs)
文件" /usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py",第46行,发送
resp = super(CacheControlAdapter,self).send(request,** kw)
文件" /usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py",第376行,发送
超时=超时
文件" /usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py" ;,第610行,在urlopen中
_stacktrace = sys.exc_info()[2])
文件&#34; /usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py" ;,第228行,增量< / p>
总计 - = 1
TypeError:不支持的操作数类型 - =:&#39;重试&#39;和&#39; int&#39;
答案 0 :(得分:1)
下载.whl熊猫文件 尝试
pip install pandas.whl
或升级或pip
并重复命令
pip install pandas
答案 1 :(得分:0)