我想安装picamera但是我收到了这个错误:
pi@rpi01-1:~ $ pip install picamera
Downloading/unpacking picamera
Cleaning up...
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 SysCallError)
Storing debug log for failure in /home/pi/.pip/pip.log
我尝试升级系统:
sudo apt-get install picamera
但我无法安装。我尝试了同样的错误:
pip install picamera
有什么想法吗?
答案 0 :(得分:0)
首先
sudo apt-get update
然后,对于Python 2.x
sudo apt-get install python-picamera
和Python 3.x
sudo apt-get install python3-picamera