Giter Site home page Giter Site logo

Comments (7)

mmatuson avatar mmatuson commented on July 26, 2024

The easiest way to install MySQLdb is through your OS's package manager. On Ubuntu you can do sudo apt-get install python-mysqldb

What OS are you trying to install it on?

from schemasync.

mattsawyer77 avatar mattsawyer77 commented on July 26, 2024

I'm on OSX 10.6, using Homebrew for package management. But since Homebrew doesn't have a package for MySQLdb (and the SchemaSync Homebrew package didn't work either), I'm attempting to install both manually. Do I need to set some sort of environment variable so that SchemaSync can see MySQLdb?

Thanks for your help.
Matt

from schemasync.

mattsawyer77 avatar mattsawyer77 commented on July 26, 2024

I was able to resolve the problem by doing
sudo brew install mysql-python
sudo brew install schemasync

It seems that the brew file for schemasync simply needs to add mysql-python as a dependency.

from schemasync.

mmatuson avatar mmatuson commented on July 26, 2024

OK, great. Let me know if there are any other issues.

from schemasync.

jeffcrouse avatar jeffcrouse commented on July 26, 2024

I'm on OSX 10.7 and I have the same problem, only I'm not using homebrew. This is what I did:

wget http://downloads.sourceforge.net/project/mysql-python/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz
tar -xvf MySQL-python-1.2.3.tar.gz
cd MySQL-python-1.2.3
python setup.py build
sudo python setup.py

wget http://www.schemasync.org/downloads/SchemaSync-0.9.2.tar.gz
tar xvzf SchemaSync-0.9.2.tar.gz
cd SchemaSync-0.9.2
sudo python setup.py install

schemasync --help

The result:
Error: Missing Required Dependency MySQLdb.

Any ideas?

from schemasync.

mmatuson avatar mmatuson commented on July 26, 2024

Jeff, do you get an error if you run python -c"import MySQLdb" ?

from schemasync.

jeffcrouse avatar jeffcrouse commented on July 26, 2024

I do get an error:

File "", line 1, in
File "build/bdist.macosx-10.7-intel/egg/MySQLdb/init.py", line 19, in
File "build/bdist.macosx-10.7-intel/egg/_mysql.py", line 7, in
File "build/bdist.macosx-10.7-intel/egg/_mysql.py", line 6, in bootstrap
ImportError: dlopen(/Users/jeff/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Users/jeff/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so
Reason: image not found

Like the original poster, I have no experience with Python, so I don't even understand why it is looking for something in ~/.python-eggs

Anway, the error message made it clear what was wrong, and I fixed it with the following:

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

I suppose you could also add the following to your .profile

export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH but it wouldn't work for all users

Thanks mmatuson!

from schemasync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.