I know this is a bit of a long shot but I’m at a loss of what else to do.
I need Pyqt for python 2.6 64 bit, that also has mysql support.
Anyone know of a precompiled one? I know its a long shot but I’m getting desperate lol :curses:.
I have tried about 5 different guides online now for compiling your own version and in everyone I run into an error somewhere along the lines. I have literally spent the last 5 hours searching and trying different guides read god knows how many forum posts on various errors and issues I have come across but sadly still have managed to do it.
Why do I need this, well its for my Dissertation so if I cant get it to work I’m in a bit of a pickle, my only other option is to use SQLite, but I’d much rather use MySql if I could.
Any help would be greatly appreciated.
Thanks
Tom.
Just to add more info the main issue I came across time and time again was building qt with Mysql support.
The plan was to use Mysql for my asset management tool within maya, which is why I would need to compile pyqt.
Could you use SQLite3? it’s included with python already be default.
The search phrase “python 2.6 mysql 64 bit windows” returned this as the first link:
http://www.codegood.com/archives/4
Hope that helps.
Brett
forget about Qt SQL support if you want to use it with Maya. It’s just too much hassle to get it to work. I searched A LOT for a pyQt version where the drivers work in Maya. No Luck. Drivers would work stand alone but not load in Maya.
Sqlite3 - you can get this to work with Maya no problem.
Otherwise pyODBC turned out to work really well for us. It’s lightweight and very versatile, letting you connect to SQL Server, MySQL, etc. Pro: easy to compile and works with all Maya versions - Con: need to install the MySQL ODBC driver.
mySQL module should work too. I think we tried it briefly and it worked.
As i was going to use it to display files i thought it would be easier to use the pyqt api rather than the python api.
Essentially the two easist alternatives are use sqlite pyqt api or use Mysql python api.
Thanks all for comments and links, any recommendations on which solution is better?
I like sqlite since it’s a standard library module, and it should be just as easy to use with pyqt as the included mysql support I would guess. (It looks like both require you to manually write out your sql statements.)
Cheers.
I have been playing around with the pyqt sqlite api today and it has some interesting features.
You can use a Qsqlmodel and plug it into a table and then use the set filters to filter it out, essentially just creating a WHERE statement.
Or you can use a QSqlQueryModel in which you pass in a SQL query and then you can send the results directly to a table.
Also found a few free tools to help me populate the database with data so they will come in handy.
[QUOTE=RobertKist;9693]forget about Qt SQL support if you want to use it with Maya. It’s just too much hassle to get it to work. I searched A LOT for a pyQt version where the drivers work in Maya. No Luck. Drivers would work stand alone but not load in Maya.
[/QUOTE]
I have just ran into this problem, its really strange the drivers load fine when running it outside of maya but as you said when you try to run it in maya none of the drivers load.
This has left me in a bit of a pickle.
It’s really easy to use the pyqt db api to display and filter the information as needed, however this will not work in maya.
So two options.
-Develop the tool to be used outside of maya, and have it launch maya when you open a file.
- Plus side: Easy to display sql results
- Down side: Can only open one file, would have to close maya and reopen it to open another file, really not a good solution.
-Use the default maya db api and use that to populate views.
- Plus side: it will work lol
- Down side: Never tried this method, will have to look deeper into model/view programming i would imagine.
Anyone know how easy the second method would be, I’ve looked for a few examples but they all show using the pyqt api.
Cheers.
Just a quick update, I have found a great example by Torsten Marek I believe, where he uses the DB-API and creates a custom model for it.
This will hopefully save me a lot of work.
Just in case others want to test it out heres the link: