Python Forum
Error when installing Seaborn package using pip
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when installing Seaborn package using pip
#1
I've been using pip to install other packages and it works perfectly (ex. for numpy). However when downloading/installing seaborn I get an
unexpected error. I'm installing on a Raspberry Pi 3 running Raspbian GNU/Linux 9.4 (stretch), and am using Python 3.5.3

Pretty straightforward code:

pip install seaborn
Which outputs this:

Output:
Collecting seaborn Using cached https://files.pythonhosted.org/packages/10/01/dd1c7838cde3b69b247aaeb61016e238cafd8188a276e366d36aa6bcdab4/seaborn-0.8.1.tar.gz Collecting matplotlib (from seaborn) Downloading https://files.pythonhosted.org/packages/ec/ed/46b835da53b7ed05bd4c6cae293f13ec26e877d2e490a53a709915a9dcb7/matplotlib-2.2.2.tar.gz (37.3MB) 99% |████████████████████████████████| 37.3MB 2.0MB/s eta 0:00:01
Which is immediately followed by this error:

Error:
Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run wb.build(autobuilding=True) File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 620, in _prepare_file session=self.session, hashes=hashes) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 821, in unpack_url hashes=hashes File "/usr/lib/python2.7/dist-packages/pip/download.py", line 659, in unpack_http_url hashes) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 882, in _download_http_url _download_url(resp, link, content_file, hashes) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 603, in _download_url hashes.check_against_chunks(downloaded_chunks) File "/usr/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks for chunk in chunks: File "/usr/lib/python2.7/dist-packages/pip/download.py", line 571, in written_chunks for chunk in chunks: File "/usr/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter for x in it: File "/usr/lib/python2.7/dist-packages/pip/download.py", line 560, in resp_read decode_content=False): File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 432, in stream data = self.read(amt=amt, decode_content=decode_content) File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/response.py", line 380, in read data = self._fp.read(amt) File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 63, in read self._close() File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 50, in _close self.__callback(self.__buf.getvalue()) File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/controller.py", line 275, in cache_response self.serializer.dumps(request, response, body=body), File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/serialize.py", line 55, in dumps "body": _b64_encode_bytes(body), File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/serialize.py", line 12, in _b64_encode_bytes return base64.b64encode(b).decode("ascii") File "/usr/lib/python2.7/base64.py", line 54, in b64encode encoded = binascii.b2a_base64(s)[:-1] MemoryError
Any help would be greatly appreciated. Thank you
Reply
#2
looks like it ran out of memory before it could finish.
How much is available?
worked fine for me:
Output:
Larz60p@linux-nnem: ~:$pip install seaborn Collecting seaborn Downloading https://files.pythonhosted.org/packages/10/01/dd1c7838cde3b69b247aaeb61016e238cafd8188a276e366d36aa6bcdab4/seaborn-0.8.1.tar.gz (178kB) 100% |████████████████████████████████| 184kB 9.4MB/s Collecting scipy (from seaborn) Downloading https://files.pythonhosted.org/packages/40/de/0c22c6754370ba6b1fa8e53bd6e514d4a41a181125d405a501c215cbdbd6/scipy-1.1.0-cp37-cp37m-manylinux1_x86_64.whl (31.2MB) 100% |████████████████████████████████| 31.2MB 3.4MB/s Collecting matplotlib (from seaborn) Downloading https://files.pythonhosted.org/packages/da/1d/e6d9af0b5045597869537391f1036ab841c613c3f3e40f16bbc1d75450ee/matplotlib-2.2.2-cp37-cp37m-manylinux1_x86_64.whl (12.6MB) 100% |████████████████████████████████| 12.6MB 6.3MB/s Collecting pandas (from seaborn) Downloading https://files.pythonhosted.org/packages/63/77/27b920abc3eea0bfec9bd027dbdbbc7b5121b80806de20d331452ef23285/pandas-0.23.3-cp37-cp37m-manylinux1_x86_64.whl (8.9MB) 100% |████████████████████████████████| 8.9MB 7.3MB/s Requirement already satisfied: numpy>=1.8.2 in ./.pyenv/versions/3.7.0/lib/python3.7/site-packages (from scipy->seaborn) (1.14.5) Requirement already satisfied: six>=1.10 in ./.pyenv/versions/3.7.0/lib/python3.7/site-packages (from matplotlib->seaborn) (1.11.0) Collecting kiwisolver>=1.0.1 (from matplotlib->seaborn) Downloading https://files.pythonhosted.org/packages/5c/7e/d6cae2f241ba474a2665f24b480bf4e247036d63939dda2bbc4d2ee5069d/kiwisolver-1.0.1-cp37-cp37m-manylinux1_x86_64.whl (89kB) 100% |████████████████████████████████| 92kB 10.7MB/s Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib->seaborn) Downloading https://files.pythonhosted.org/packages/6a/8a/718fd7d3458f9fab8e67186b00abdd345b639976bc7fb3ae722e1b026a50/pyparsing-2.2.0-py2.py3-none-any.whl (56kB) 100% |████████████████████████████████| 61kB 16.7MB/s Collecting python-dateutil>=2.1 (from matplotlib->seaborn) Downloading https://files.pythonhosted.org/packages/cf/f5/af2b09c957ace60dcfac112b669c45c8c97e32f94aa8b56da4c6d1682825/python_dateutil-2.7.3-py2.py3-none-any.whl (211kB) 100% |████████████████████████████████| 215kB 11.5MB/s Collecting pytz (from matplotlib->seaborn) Downloading https://files.pythonhosted.org/packages/30/4e/27c34b62430286c6d59177a0842ed90dc789ce5d1ed740887653b898779a/pytz-2018.5-py2.py3-none-any.whl (510kB) 100% |████████████████████████████████| 512kB 11.9MB/s Collecting cycler>=0.10 (from matplotlib->seaborn) Downloading https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl Requirement already satisfied: setuptools in ./.pyenv/versions/3.7.0/lib/python3.7/site-packages (from kiwisolver>=1.0.1->matplotlib->seaborn) (39.0.1) Installing collected packages: scipy, kiwisolver, pyparsing, python-dateutil, pytz, cycler, matplotlib, pandas, seaborn Running setup.py install for seaborn ... done Successfully installed cycler-0.10.0 kiwisolver-1.0.1 matplotlib-2.2.2 pandas-0.23.3 pyparsing-2.2.0 python-dateutil-2.7.3 pytz-2018.5 scipy-1.1.0 seaborn-0.8.1 Larz60p@linux-nnem: ~:$
Reply
#3
I'm not very experienced with deciphering the Linux file system but this is what I found:
df -h
Output:
Filesystem Size Used Avail Use% Mounted on /dev/root 30G 4.8G 24G 18% / devtmpfs 460M 0 460M 0% /dev tmpfs 464M 61M 403M 14% /dev/shm tmpfs 464M 13M 452M 3% /run tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 464M 0 464M 0% /sys/fs/cgroup /dev/mmcblk0p1 43M 22M 21M 52% /boot tmpfs 93M 0 93M 0% /run/user/1000
I'm using a 32GB SD card and haven't installed very much on it, plus I'm able to install other packages without running into memory issues. But I'm also a newbie, so I apologize if I'm overlooking something from the above disk usage info.
Reply
#4
try:
df /usr/lib
which is where you are installing
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Seaborn not displaying the specified n bins russellm10 0 539 Jun-28-2023, 02:51 AM
Last Post: russellm10
  Seaborn and Pandas russellm10 0 1,273 Nov-20-2021, 04:01 PM
Last Post: russellm10
  Reset seaborn ju21878436312 2 4,992 Jun-15-2021, 09:31 AM
Last Post: ju21878436312
  trouble installing python package Tuxedo 1 3,166 Apr-07-2021, 09:07 AM
Last Post: Larz60+
  Installing package in Anaconda on an Intranet Computer Secret 1 1,900 Sep-17-2020, 02:16 PM
Last Post: Larz60+
  Seaborn regplot regression equation? Cricri 2 6,626 Jun-09-2020, 01:32 PM
Last Post: Cricri
  Seaborn clustermap clustered data YoYo1975 2 2,265 Feb-05-2020, 09:08 AM
Last Post: YoYo1975
  Error installing numpy srm 3 3,472 Jul-08-2019, 06:26 PM
Last Post: srm
  Return ERROR when installing pyopencl Helcio_Sarabando 1 4,112 Sep-08-2018, 11:23 PM
Last Post: Larz60+
  Why can't I import seaborn module? Athenaeum 1 6,436 Dec-09-2017, 08:40 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020