|
I've installed sorl-thumbnail via pip using the process outlined here: http://docs.webfaction.com/software/python.html First in the $HOME/lib/python2.7 by default, then, after removing it, in $HOME/webapps/myapp/lib/python2.7. I've verified that I have the "sorl" directory there as well as the egg, but whenever I run "python2.7 manage.py syncdb", I get: Error: No module named sorl-thumbnail I've tried adding:
directly to manage.py, as well as running: PYTHONPATH=/home/rarnaoot/webapps/myapp/lib/python2.7:$PYTHONPATH python2.7 manage.py syncdb - I still get the error. Any suggestions on where to go from here? |
|
I believe you need to have sorl.thumbnail in your settings.py not sorl-thumbnail. |
|
To check if the module is on the path you first should check that the right path is getting set. Use manage.py's shell command,
Than use sys.path to check if the module is on the path,
|
I have to remove 'sorl-thumbnail' from settings.py to be able to run the shell, but I can confirm that those specified directories are included:
['/home/rarnaoot/webapps/bellefour/lib/python2.7', '/home/rarnaoot/webapps/bellefour/lib/python2.7/sorl', '/home/rarnaoot/webapps/bellefour/lib/python2.7/sorl/thumbnail', '/home/rarnaoot/webapps/bellefour/bellefour', '/home/rarnaoot/lib/python2.7/pip-1.1-py2.7.egg', '/home/rarnaoot/lib/python2.7', '/home/rarnaoot/lib/python2.7', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/site-packages/PIL']
Is there some further directory I need to include?
Isn't my face red. You're right, it's sorl.thumbnail not sorl-thumbnail. Thanks very much!