Installing Python libraries on sd card

Hello,

I am trying to install the lxml library on my arduino yun, configured with the openwrt-yun 1.6.2, but I always get this message:

Downloading/unpacking lxml

  • Downloading lxml-3.6.0.tar.gz (3.7MB): 3.7MB downloaded*
    Cleaning up...
    Exception:
    Traceback (most recent call last):
  • File "/usr/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main*
  • status = self.run(options, args)*
  • File "/usr/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 278, in run*
  • requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)*
  • File "/usr/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1197, in prepare_files*
  • do_download,*
  • File "/usr/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1375, in unpack_url*
  • self.session,*
  • File "/usr/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/download.py", line 582, in unpack_http_url*
  • unpack_file(temp_location, location, content_type, link)*
  • File "/usr/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 625, in unpack_file*
  • untar_file(filename, location)*
  • File "/usr/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 586, in untar_file*
  • shutil.copyfileobj(fp, destfp)*
  • File "/usr/lib/python2.7/shutil.py", line 52, in copyfileobj*
  • fdst.write(buf)*
    IOError: [Errno 28] No space left on device
    Storing debug log for failure in /root/.pip/pip.log

I have extended the disk space with an sd card. When I run df -h / /mnt/sda1 I obtain:

Filesystem Size Used Available Use% Mounted on
rootfs 6.7G 544.4M 5.8G 8% /
/dev/sda1 7.8G 48.0K 7.8G 0% /mnt/sda1

I have also extended the RAM with a swap file:

  • total used free shared buffers*
    Mem: 60904 42324 18580 3616 12588
    -/+ buffers : 29736 31168
    Swap: 524284 2004 522280

I have tried to install the pyhton package in the SD card using the following commands:

pip install lxml
pip install --target=/mnt/sda lxml
pip install --install-option="--prefix=/mnt/sda1" lxml

But I always obtain the same result which makes me think that the arduino is always trying to install the package in the same place, not the SD card.

How can I install this library on the SD card while maintaining consistency on python?

Thank you

Solved. Reinstall open-wrt.
I dont know what was the problem