1
我正在使用piface在Raspberry pi 2上工作。我試圖按照以下步驟安裝openCV:click here。當我嘗試做第6步(安裝PIP),我得到了以下錯誤:Raspberry pi - get-pip.py錯誤
[email protected] ~ $ sudo python get-pip.py
Exception:
Traceback (most recent call last):
File "/tmp/tmpxtbKBh/pip.zip/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/tmp/tmpxtbKBh/pip.zip/pip/commands/install.py", line 305, in run
wb.build(autobuilding=True)
File "/tmp/tmpxtbKBh/pip.zip/pip/wheel.py", line 705, in build
self.requirement_set.prepare_files(self.finder)
File "/tmp/tmpxtbKBh/pip.zip/pip/req/req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "/tmp/tmpxtbKBh/pip.zip/pip/req/req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/tmp/tmpxtbKBh/pip.zip/pip/req/req_set.py", line 409, in _prepare_file
req_to_install, finder)
File "/tmp/tmpxtbKBh/pip.zip/pip/req/req_set.py", line 365, in _check_skip_installed
finder.find_requirement(req_to_install, self.upgrade)
File "/tmp/tmpxtbKBh/pip.zip/pip/index.py", line 486, in find_requirement
all_versions = self._find_all_versions(req.name)
File "/tmp/tmpxtbKBh/pip.zip/pip/index.py", line 404, in _find_all_versions
index_locations = self._get_index_urls_locations(project_name)
File "/tmp/tmpxtbKBh/pip.zip/pip/index.py", line 378, in _get_index_urls_locations
page = self._get_page(main_index_url)
File "/tmp/tmpxtbKBh/pip.zip/pip/index.py", line 818, in _get_page
return HTMLPage.get_page(link, session=self.session)
File "/tmp/tmpxtbKBh/pip.zip/pip/index.py", line 928, in get_page
"Cache-Control": "max-age=600",
File "/tmp/tmpxtbKBh/pip.zip/pip/_vendor/requests/sessions.py", line 477, in get
return self.request('GET', url, **kwargs)
File "/tmp/tmpxtbKBh/pip.zip/pip/download.py", line 373, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/tmp/tmpxtbKBh/pip.zip/pip/_vendor/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/tmp/tmpxtbKBh/pip.zip/pip/_vendor/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/tmp/tmpxtbKBh/pip.zip/pip/_vendor/cachecontrol/adapter.py", line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/tmp/tmpxtbKBh/pip.zip/pip/_vendor/requests/adapters.py", line 370, in send
timeout=timeout
File "/tmp/tmpxtbKBh/pip.zip/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "/tmp/tmpxtbKBh/pip.zip/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 344, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
File "/tmp/tmpxtbKBh/pip.zip/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 314, in _raise_timeout
if 'timed out' in str(err) or 'did not complete (read)' in str(err): # Python 2.6
TypeError: __str__ returned non-string (type Error)
我試圖做的步驟7,但我得到了幾乎相同的消息(安裝的virtualenv):
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 194, in find_requirement
page = self._get_page(main_index_url, req)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_page
session=self.session,
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 694, in get_page
req, link, "connection error: %s" % exc, url,
TypeError: __str__ returned non-string (type Error)
Storing debug log for failure in /root/.pip/pip.log
我試圖解決這個問題,因爲2天,所以如果任何人都可以幫助我...
請。
如果您需要更多信息,請不要猶豫。我還需要爲我的英語,我是一個瑞士人學生道歉......
這是什麼'蟒蛇--version'給你? – Holt
它給了我Python 2.7.9 @Holt – Mathiem