Installing libsass (django_libsass) on Mac OS Yosemite
May 01, 2015 · Updated: Jul 12, 2021 · by Tim Kamanin
I started playing with Wagtail recently (a very promising Django CMS) and they use django_libsass to compile their sass into css. Unfortunatelly, if you'll try to install django libsass via PIP on Mac you'll get a compile error message. I tried lots of approaches to fix this and it didn't work in the end. So the solution was to use Python Wheels (a precompiled python packages). All you need is:
-
Install wheels via PIP:
pip install wheels -
Go to https://pypi.python.org/pypi/libsass and find a wheel for Mac OS 10.10
-
Download the wheel we want to install:
wget https://pypi.python.org/packages/2.7/l/libsass/libsass-0.7.0-cp27-none-macosx_10_10_intel.whl -
Install
libsasswheel:wheel install libsass-0.7.0-cp27-none-macosx_10_10_intel.whl --forceI added
\--forceparameter, because wheel told me the package is not compatible with my OS (probably bug, because all works fine in the end) -
Install
django_libsasspackage viapip:pip install django_libsass
And now all should be working just fine!
Hey, if you've found this useful, please share the post to help other folks find it: