django1.7, python3.4 and MySQL

363 views
Skip to first unread message

Larry Martell

unread,
Nov 3, 2014, 10:55:25 AM11/3/14
to django...@googlegroups.com
So it seems MySQLdb doesn't support python3, and I see this on the django site:

mysqlclient is a fork of MySQLdb which notably supports Python 3 and
can be used as a drop-in replacement for MySQLdb. At the time of this
writing, this is the recommended choice for using MySQL with Django.

mysqlclient

Django requires mysqlclient 1.3.3 or later. Note that Python 3.2 is
not supported. Except for the Python 3.3+ support, mysqlclient should
mostly behave the same as MySQLDB.

So does this mean that mysqlclient does support python3.4?

And how can I download a debian package for that?

Andreas Kuhne

unread,
Nov 3, 2014, 11:00:34 AM11/3/14
to django...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACwCsY6%2BwA6EQK5uk8NmFiVjqYnZR%3DYoWKdum0AMrZdfUm%3DaDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

We are working with mysql's own python client, which you can download and find at http://dev.mysql.com/downloads/connector/python/.

You should probably use a virtual environment instead of installing it into the debian system and using it as default.

Regards,

Andréas

Larry Martell

unread,
Nov 3, 2014, 11:06:22 AM11/3/14
to django...@googlegroups.com
On Mon, Nov 3, 2014 at 10:59 AM, Andreas Kuhne
<andrea...@suitopia.com> wrote:
>
> 2014-11-03 16:54 GMT+01:00 Larry Martell <larry....@gmail.com>:
>>
>> So it seems MySQLdb doesn't support python3, and I see this on the django
>> site:
>>
>> mysqlclient is a fork of MySQLdb which notably supports Python 3 and
>> can be used as a drop-in replacement for MySQLdb. At the time of this
>> writing, this is the recommended choice for using MySQL with Django.
>>
>> mysqlclient
>>
>> Django requires mysqlclient 1.3.3 or later. Note that Python 3.2 is
>> not supported. Except for the Python 3.3+ support, mysqlclient should
>> mostly behave the same as MySQLDB.
>>
>> So does this mean that mysqlclient does support python3.4?
>>
>> And how can I download a debian package for that?

>
>
> We are working with mysql's own python client, which you can download and
> find at http://dev.mysql.com/downloads/connector/python/.
>
> You should probably use a virtual environment instead of installing it into
> the debian system and using it as default.

We use vagrant. I was hoping to use mysqlclient, thinking it would be
more or less a drop in replacement for MySQLdb.

lza...@ucs.br

unread,
Nov 3, 2014, 11:13:02 AM11/3/14
to django...@googlegroups.com

Yes, mysql-python-connector works fine with python3.4.2.

I'm using it and no problems until now.

Enviado via UCSMail.

Larry Martell

unread,
Nov 3, 2014, 12:11:05 PM11/3/14
to django...@googlegroups.com
On Mon, Nov 3, 2014 at 11:13 AM, <lza...@ucs.br> wrote:
>
> Yes, mysql-python-connector works fine with python3.4.2.
>
> I'm using it and no problems until now.

Thanks for the reply. Do you know where I can download it from?

Larry Martell

unread,
Nov 3, 2014, 12:18:49 PM11/3/14
to django...@googlegroups.com
On Mon, Nov 3, 2014 at 12:10 PM, Larry Martell <larry....@gmail.com> wrote:
> On Mon, Nov 3, 2014 at 11:13 AM, <lza...@ucs.br> wrote:
>>
>> Yes, mysql-python-connector works fine with python3.4.2.
>>
>> I'm using it and no problems until now.
>
> Thanks for the reply. Do you know where I can download it from?

Oh, wait - you're talking about MySQL Connector/Python right? I am
looking for info on mysqlclient.

Leandro Zanuz

unread,
Nov 3, 2014, 12:43:52 PM11/3/14
to django...@googlegroups.com

You can download it on mysql official website:

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


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

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


Enviado via UCSMail.

Leandro Zanuz

unread,
Nov 3, 2014, 12:47:56 PM11/3/14
to django...@googlegroups.com
On Debian/Ubuntu I use:

apt-get install libmysqld-dev libmysqlclient-dev

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

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


Enviado via UCSMail.

Larry Martell

unread,
Nov 3, 2014, 12:55:25 PM11/3/14
to django...@googlegroups.com
On Mon, Nov 3, 2014 at 12:42 PM, Leandro Zanuz <lza...@ucs.br> wrote:
>
> You can download it on mysql official website:
>
> http://dev.mysql.com/downloads/connector/python/

Y

Larry Martell

unread,
Nov 3, 2014, 12:56:27 PM11/3/14
to django...@googlegroups.com
On Mon, Nov 3, 2014 at 12:42 PM, Leandro Zanuz <lza...@ucs.br> wrote:
>
> You can download it on mysql official website:
>
> http://dev.mysql.com/downloads/connector/python/

Yes, I know that. I am looking for mysqlclient

Tim Graham

unread,
Nov 4, 2014, 7:37:14 AM11/4/14
to django...@googlegroups.com
mysqlclient is available here: https://pypi.python.org/pypi/mysqlclient

I just fixed the missing links in Django's database documentation -- sorry for the confusion.

Larry Martell

unread,
Nov 4, 2014, 7:53:55 AM11/4/14
to django...@googlegroups.com
Thanks.
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2206e256-189c-4689-a04f-8fdeeacc0e20%40googlegroups.com.

eduardo.c...@gmail.com

unread,
May 20, 2015, 11:05:17 AM5/20/15
to django...@googlegroups.com
Hi, sorry but I tryed to install mysqlclient-1.3.6-cp34-none-win_amd64.whl using pip (pip install mysqlclient-1.3.6-cp34-none-win_amd64.whl) and I can't, the pip launch de exceptio UnsupportedWheel, I have installed Python3.4.2 in Windows8.1 and I don't know if the error happens by a version problem. I really need some help. Thanks
ERROR LOG REPORT:
C:\Python34\Scripts\pip run on 05/20/15 10:50:28
mysqlclient-1.3.6-cp34-none-win_amd64.whl is not a supported wheel on this platform.
Exception information:
Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Python34\lib\site-packages\pip\commands\install.py", line 257, in run
    InstallRequirement.from_line(name, None))
  File "C:\Python34\lib\site-packages\pip\req.py", line 167, in from_line
    raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)
pip.exceptions.UnsupportedWheel: mysqlclient-1.3.6-cp34-none-win_amd64.whl is not a supported wheel on this platform.

Alasdair Nicol

unread,
May 20, 2015, 12:26:16 PM5/20/15
to django...@googlegroups.com
Hi eduardo,

Have you tried the following?

pip install mysqlclient

Usually, you should use the package name, you don't need to specify the
specific wheel you want to install.

Cheers,
Alasdair
--
Alasdair Nicol
Developer, MEMSET

mail: alas...@memset.com
web: http://www.memset.com/

Memset Ltd., registration number 4504980.
Building 87, Dunsfold Park, Stovolds Hill, Cranleigh, Surrey, GU6 8TB, UK
Reply all
Reply to author
Forward
0 new messages