thanksd
thanksd

Reputation: 55644

Django "./manage.py bower install" tells me bower isn't installed when it is

I'm following the instructions from the django-bower setup readme here. I've installed django-bower (v5.1.0) via $ pip install -r requirements.txt (django-bower==5.1.0 is in my requirements.txt). Now I'm trying to run $ ./manage.py bower install (as per the instructions) but I'm getting this error:

BowerNotInstalled: Bower not installed, read instruction here - http://bower.io/

Trying to run $ pip install django-bower gives me a Requirement already satisfied message.

What am I missing?

Upvotes: 2

Views: 2566

Answers (2)

amota
amota

Reputation: 331

I was having issues with this, and I did have bower installed.

This solved it for me (placed in settings.py)

import os

BOWER_PATH = os.path.normpath(r'/Users/username/.npm/lib/node_modules/bower/bin/bower')

(instead of 'username', put in your username ;) )

Copied from an answer I found that had slashes going the other way, I'm assuming from Windows, so here's the example with that:

BOWER_PATH = os.path.normpath(r'C:\Users\username\AppData\Roaming\npm\bower.cmd')

Upvotes: 0

François Constant
François Constant

Reputation: 5496

That error message indicates that bower cannot be found. django-bower is properly installed.

Check the instructions here: https://bower.io/#install-bower:

npm install -g bower

Upvotes: 5

Related Questions