mysql in maya

280 views
Skip to first unread message

n.si...@barajoun.com

unread,
Jun 25, 2014, 10:25:46 AM6/25/14
to python_in...@googlegroups.com
"import MySQLdb" works from python 2.6 ( outside maya ). But since maya is using python 2.7 above command gives an error.

# ImportError: No module named _mysql #

Question :

How do i get independant of download a module from net to run mysql ( or an alternative ) through maya.

What is step by step installation to get MySQL running on maya ( linux ( centos ) and windows )

If their is a need to compile ( or any thing like this, how would a first timer do it ).

Thank you.


Tony Barbieri

unread,
Jun 25, 2014, 10:31:47 AM6/25/14
to python_in...@googlegroups.com
The mysqldb package does need to be compiled for your os and python version.

There is a pure python alternative here: https://github.com/PyMySQL/PyMySQL

In order to compile mysqldb you should only have to run the setup.py that is distributed with it.




--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a7bacd4d-95aa-4954-a991-cade53856496%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Tony

Marcus Ottosson

unread,
Jun 25, 2014, 10:37:52 AM6/25/14
to python_in...@googlegroups.com
On Windows, Python in Maya is running MSC1600 (since version 2012 or so?) as opposed to MSC1500 which is the default for standalone Python, so you might have to compile it via mayapy.exe for it to play nice with Maya.



For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Fredrik Averpil

unread,
Jun 25, 2014, 11:27:32 AM6/25/14
to python_in...@googlegroups.com
I've compiled MySQLdb for Python 2.7 (which Maya 2014/2015 is using). I jotted down some notes about compiling it here: http://fredrik.averpil.com/post/87906472836

Regards,
Fredrik




Nils Lerin

unread,
Jul 3, 2014, 8:20:23 AM7/3/14
to python_in...@googlegroups.com

The mysql connector is written in pure python and does not require any additional libs or need to be compiled.

http://dev.mysql.com/downloads/connector/python/

Robert White

unread,
Jul 3, 2014, 12:33:45 PM7/3/14
to python_in...@googlegroups.com
Or PyMySQL which is another pure python implementation this one offers the same interface as MySQLdb so it can act as a drop in replacement. No idea if the MySQL connector behaves the same way.


On Thursday, July 3, 2014 7:20:23 AM UTC-5, Nils wrote:

The mysql connector is written in pure python and does not require any additional libs or need to be compiled.

http://dev.mysql.com/downloads/connector/python/

On Jun 25, 2014 5:27 PM, "Fredrik Averpil" <fredrik...@gmail.com> wrote:
I've compiled MySQLdb for Python 2.7 (which Maya 2014/2015 is using). I jotted down some notes about compiling it here: http://fredrik.averpil.com/post/87906472836

Regards,
Fredrik


On Wed, Jun 25, 2014 at 4:37 PM, Marcus Ottosson <konstr...@gmail.com> wrote:
On Windows, Python in Maya is running MSC1600 (since version 2012 or so?) as opposed to MSC1500 which is the default for standalone Python, so you might have to compile it via mayapy.exe for it to play nice with Maya.
On 25 June 2014 15:31, Tony Barbieri <grea...@gmail.com> wrote:
The mysqldb package does need to be compiled for your os and python version.

There is a pure python alternative here: https://github.com/PyMySQL/PyMySQL

In order to compile mysqldb you should only have to run the setup.py that is distributed with it.
On Wed, Jun 25, 2014 at 10:25 AM, <n.si...@barajoun.com> wrote:
"import MySQLdb" works from python 2.6 ( outside maya ). But since maya is using python 2.7 above command gives an error.

# ImportError: No module named _mysql #

Question :

How do i get independant of download a module from net to run mysql ( or an alternative ) through maya.

What is step by step installation to get MySQL running on maya ( linux ( centos ) and windows )

If their is a need to compile ( or any thing like this, how would a first timer do it ).



Thank you.


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.



--
Tony

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.



--
Marcus Ottosson
konstr...@gmail.com

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages