I am working in a opencv project on the raspberry pi, and im using a virtual environment, but i used pip to install numpy, scipy and other libraries, but when trying to install matplotlib on pip by:
pip install matplotlib
it throws an error:
Exception: Traceback (most recent call last): File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main status = self.run(options, args) File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/commands/install.py", line 282, in run requirement_set.prepare_files(finder) File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 334, in prepare_files functools.partial(self._prepare_file, finder)) File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 321, in _walk_req_to_install more_reqs = handler(req_to_install) File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 491, in _prepare_file session=self.session) File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/download.py", line 825, in unpack_url session, File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/download.py", line 673, in unpack_http_url from_path, content_type = _download_http_url(link, session, temp_dir) File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/download.py", line 886, in _download_http_url _download_url(resp, link, content_file) File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/download.py", line 621, in _download_url for chunk in progress_indicator(resp_read(4096), 4096): File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/utils/ui.py", line 133, in iter for x in it: File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/download.py", line 586, in resp_read decode_content=False): File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 307, in stream data = self.read(amt=amt, decode_content=decode_content) File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py", line 243, in read data = self._fp.read(amt) File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 54, in read self.__callback(self.__buf.getvalue()) File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py", line 224, in cache_response self.serializer.dumps(request, response, body=body), File "/home/pi/.virtualenvs/cv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 81, in dumps ).encode("utf8"), MemoryError
So for now i cant install matplotlib. How can i avoid the error?