Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 26780  / 2 Years ago, fri, march 11, 2022, 7:49:35

I'm trying to install OpenStack Dashboard following this guide from git: http://wiki.openstack.org/OpenStackDashboard



But when I run this command to sync database:



$ tools/with_venv.sh openstack-dashboard/manage.py syncdb


It returns that:



File "/home/user1/horizon/.venv/local/lib/python2.7/sitepackages/django/db/backends/mysql>    /base.py", line 14, in <module>    
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb


I installed package "python-mysqldb" several times, but it's still raised this error.
When I run:



>>> import MySQLdb



in python interpreter, it's fine!



And I tried to install through easy_install, but the MySQL-python is installed:



$ sudo easy_install MySQL-python



Searching for MySQL-python



Best match: MySQL-python 1.2.3
MySQL-python 1.2.3 is already the active version in easy-install.pth



Using /usr/lib/pymodules/python2.7



Processing dependencies for MySQL-python



Finished processing dependencies for MySQL-python




Here are the content of tools/with_venv.sh



#!/bin/bash
TOOLS=`dirname $0`
VENV=$TOOLS/../.venv
source $VENV/bin/activate && $@


When I run: tools/with_venv.sh it returns nothing.



What's wrong in my case?


More From » openstack

 Answers
0

I asked this question in launchpad too. Thank God they help me solve this problem.
https://answers.launchpad.net/horizon/+question/189051



By running this command to install MySQL-python



$ tools/with_venv.sh pip install MySQL-python


@ Ken: Thank you. You're right. But I don't understand what's the difference between easy_install and pip command! I will check it later.


[#40135] Sunday, March 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
allowiel

Total Points: 189
Total Questions: 103
Total Answers: 105

Location: Slovenia
Member since Thu, Mar 18, 2021
3 Years ago
;