How to install mysql-connector via pip
I use sqlalchemy to access MySQL in my Python project. sqlalchemy's conf is like this:
dialect=mysql
driver=mysqlconnector
So I need to install the Python module mysql connector via pip. Any help?
python sqlalchemy mysql-connector
add a comment |
I use sqlalchemy to access MySQL in my Python project. sqlalchemy's conf is like this:
dialect=mysql
driver=mysqlconnector
So I need to install the Python module mysql connector via pip. Any help?
python sqlalchemy mysql-connector
The official package name now ismysql-connector-python
, so usepip install mysql-connector-python
– YaOzI
Nov 13 '18 at 2:00
add a comment |
I use sqlalchemy to access MySQL in my Python project. sqlalchemy's conf is like this:
dialect=mysql
driver=mysqlconnector
So I need to install the Python module mysql connector via pip. Any help?
python sqlalchemy mysql-connector
I use sqlalchemy to access MySQL in my Python project. sqlalchemy's conf is like this:
dialect=mysql
driver=mysqlconnector
So I need to install the Python module mysql connector via pip. Any help?
python sqlalchemy mysql-connector
python sqlalchemy mysql-connector
edited May 2 '17 at 21:28
Michael
3,41333857
3,41333857
asked Sep 24 '15 at 6:06
CodeforCodefor
6722520
6722520
The official package name now ismysql-connector-python
, so usepip install mysql-connector-python
– YaOzI
Nov 13 '18 at 2:00
add a comment |
The official package name now ismysql-connector-python
, so usepip install mysql-connector-python
– YaOzI
Nov 13 '18 at 2:00
The official package name now is
mysql-connector-python
, so use pip install mysql-connector-python
– YaOzI
Nov 13 '18 at 2:00
The official package name now is
mysql-connector-python
, so use pip install mysql-connector-python
– YaOzI
Nov 13 '18 at 2:00
add a comment |
6 Answers
6
active
oldest
votes
If loading via pip install mysql-connector
and leads an error Unable to find Protobuf include directory
then this would be useful pip install mysql-connector==2.1.4
Requirements mysql-connector (version >= 2.2.3) requires Protobuf C++ (version >= 2.6.0) see github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:20
I have edited and added to stackoverflow.com/questions/46215390/…
– Partha Sen
Sep 14 '17 at 9:37
add a comment |
pip install mysql-connector
Last but not least,You can also install mysql-connector via source code
Download source code from:
https://dev.mysql.com/downloads/connector/python/
related pages: pypi.python.org/pypi/mysql-connector github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:21
add a comment |
execute following command from your terminal
sudo pip install --allow-external mysql-connector-python mysql-connector-python
This worked for me, but I have no idea why "allow external" would be important.
– Stephen Ostermiller
Dec 19 '17 at 18:11
This worked for me too. However, you probably shouldn't usesudo
for this.
– swdon
Jan 26 '18 at 7:56
Worked for me :D (Without sudo) Thanks.
– Jannunen
Feb 26 '18 at 14:39
add a comment |
To install the official MySQL Connector for Python, please use the name mysql-connector-python
:
pip install mysql-connector-python
Some further discussion, when we pip search
for mysql-connector
at this time (Nov, 2018), the most related results shown as follow:
$ pip search mysql-connector | grep ^mysql-connector
mysql-connector (2.1.6) - MySQL driver written in Python
mysql-connector-python (8.0.13) - MySQL driver written in Python
mysql-connector-repackaged (0.3.1) - MySQL driver written in Python
mysql-connector-async-dd (2.0.2) - mysql async connection
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver written in Python
mysql-connector (2.1.6)
is provided on PyPI when MySQL didn't provide their officialpip install
on PyPI at beginning (which was inconvenient). But it is a fork, and is stopped updating, sopip install mysql-connector
will install this obsolete version.
And now
mysql-connector-python (8.0.13)
on PyPI is the official package maintained by MySQL, so this is the one we should install.
add a comment |
First install setuptools
sudo pip install setuptools
Then install mysql-connector
sudo pip install mysql-connector
If using Python3, then replace pip by pip3
add a comment |
For Windows
pip install mysql-connector
For Ubuntu /Linux
sudo apt-get install python3-pymysql
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32754461%2fhow-to-install-mysql-connector-via-pip%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
If loading via pip install mysql-connector
and leads an error Unable to find Protobuf include directory
then this would be useful pip install mysql-connector==2.1.4
Requirements mysql-connector (version >= 2.2.3) requires Protobuf C++ (version >= 2.6.0) see github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:20
I have edited and added to stackoverflow.com/questions/46215390/…
– Partha Sen
Sep 14 '17 at 9:37
add a comment |
If loading via pip install mysql-connector
and leads an error Unable to find Protobuf include directory
then this would be useful pip install mysql-connector==2.1.4
Requirements mysql-connector (version >= 2.2.3) requires Protobuf C++ (version >= 2.6.0) see github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:20
I have edited and added to stackoverflow.com/questions/46215390/…
– Partha Sen
Sep 14 '17 at 9:37
add a comment |
If loading via pip install mysql-connector
and leads an error Unable to find Protobuf include directory
then this would be useful pip install mysql-connector==2.1.4
If loading via pip install mysql-connector
and leads an error Unable to find Protobuf include directory
then this would be useful pip install mysql-connector==2.1.4
edited Sep 14 '17 at 9:31
answered Jun 8 '17 at 13:10
Partha SenPartha Sen
1,070913
1,070913
Requirements mysql-connector (version >= 2.2.3) requires Protobuf C++ (version >= 2.6.0) see github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:20
I have edited and added to stackoverflow.com/questions/46215390/…
– Partha Sen
Sep 14 '17 at 9:37
add a comment |
Requirements mysql-connector (version >= 2.2.3) requires Protobuf C++ (version >= 2.6.0) see github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:20
I have edited and added to stackoverflow.com/questions/46215390/…
– Partha Sen
Sep 14 '17 at 9:37
Requirements mysql-connector (version >= 2.2.3) requires Protobuf C++ (version >= 2.6.0) see github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:20
Requirements mysql-connector (version >= 2.2.3) requires Protobuf C++ (version >= 2.6.0) see github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:20
I have edited and added to stackoverflow.com/questions/46215390/…
– Partha Sen
Sep 14 '17 at 9:37
I have edited and added to stackoverflow.com/questions/46215390/…
– Partha Sen
Sep 14 '17 at 9:37
add a comment |
pip install mysql-connector
Last but not least,You can also install mysql-connector via source code
Download source code from:
https://dev.mysql.com/downloads/connector/python/
related pages: pypi.python.org/pypi/mysql-connector github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:21
add a comment |
pip install mysql-connector
Last but not least,You can also install mysql-connector via source code
Download source code from:
https://dev.mysql.com/downloads/connector/python/
related pages: pypi.python.org/pypi/mysql-connector github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:21
add a comment |
pip install mysql-connector
Last but not least,You can also install mysql-connector via source code
Download source code from:
https://dev.mysql.com/downloads/connector/python/
pip install mysql-connector
Last but not least,You can also install mysql-connector via source code
Download source code from:
https://dev.mysql.com/downloads/connector/python/
edited May 3 '17 at 2:24
dkb
1,14211324
1,14211324
answered Sep 24 '15 at 6:06
CodeforCodefor
6722520
6722520
related pages: pypi.python.org/pypi/mysql-connector github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:21
add a comment |
related pages: pypi.python.org/pypi/mysql-connector github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:21
related pages: pypi.python.org/pypi/mysql-connector github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:21
related pages: pypi.python.org/pypi/mysql-connector github.com/sanpingz/mysql-connector
– Codefor
Jun 14 '17 at 5:21
add a comment |
execute following command from your terminal
sudo pip install --allow-external mysql-connector-python mysql-connector-python
This worked for me, but I have no idea why "allow external" would be important.
– Stephen Ostermiller
Dec 19 '17 at 18:11
This worked for me too. However, you probably shouldn't usesudo
for this.
– swdon
Jan 26 '18 at 7:56
Worked for me :D (Without sudo) Thanks.
– Jannunen
Feb 26 '18 at 14:39
add a comment |
execute following command from your terminal
sudo pip install --allow-external mysql-connector-python mysql-connector-python
This worked for me, but I have no idea why "allow external" would be important.
– Stephen Ostermiller
Dec 19 '17 at 18:11
This worked for me too. However, you probably shouldn't usesudo
for this.
– swdon
Jan 26 '18 at 7:56
Worked for me :D (Without sudo) Thanks.
– Jannunen
Feb 26 '18 at 14:39
add a comment |
execute following command from your terminal
sudo pip install --allow-external mysql-connector-python mysql-connector-python
execute following command from your terminal
sudo pip install --allow-external mysql-connector-python mysql-connector-python
answered Sep 24 '15 at 7:16
Zaheer KhorajiyaZaheer Khorajiya
384110
384110
This worked for me, but I have no idea why "allow external" would be important.
– Stephen Ostermiller
Dec 19 '17 at 18:11
This worked for me too. However, you probably shouldn't usesudo
for this.
– swdon
Jan 26 '18 at 7:56
Worked for me :D (Without sudo) Thanks.
– Jannunen
Feb 26 '18 at 14:39
add a comment |
This worked for me, but I have no idea why "allow external" would be important.
– Stephen Ostermiller
Dec 19 '17 at 18:11
This worked for me too. However, you probably shouldn't usesudo
for this.
– swdon
Jan 26 '18 at 7:56
Worked for me :D (Without sudo) Thanks.
– Jannunen
Feb 26 '18 at 14:39
This worked for me, but I have no idea why "allow external" would be important.
– Stephen Ostermiller
Dec 19 '17 at 18:11
This worked for me, but I have no idea why "allow external" would be important.
– Stephen Ostermiller
Dec 19 '17 at 18:11
This worked for me too. However, you probably shouldn't use
sudo
for this.– swdon
Jan 26 '18 at 7:56
This worked for me too. However, you probably shouldn't use
sudo
for this.– swdon
Jan 26 '18 at 7:56
Worked for me :D (Without sudo) Thanks.
– Jannunen
Feb 26 '18 at 14:39
Worked for me :D (Without sudo) Thanks.
– Jannunen
Feb 26 '18 at 14:39
add a comment |
To install the official MySQL Connector for Python, please use the name mysql-connector-python
:
pip install mysql-connector-python
Some further discussion, when we pip search
for mysql-connector
at this time (Nov, 2018), the most related results shown as follow:
$ pip search mysql-connector | grep ^mysql-connector
mysql-connector (2.1.6) - MySQL driver written in Python
mysql-connector-python (8.0.13) - MySQL driver written in Python
mysql-connector-repackaged (0.3.1) - MySQL driver written in Python
mysql-connector-async-dd (2.0.2) - mysql async connection
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver written in Python
mysql-connector (2.1.6)
is provided on PyPI when MySQL didn't provide their officialpip install
on PyPI at beginning (which was inconvenient). But it is a fork, and is stopped updating, sopip install mysql-connector
will install this obsolete version.
And now
mysql-connector-python (8.0.13)
on PyPI is the official package maintained by MySQL, so this is the one we should install.
add a comment |
To install the official MySQL Connector for Python, please use the name mysql-connector-python
:
pip install mysql-connector-python
Some further discussion, when we pip search
for mysql-connector
at this time (Nov, 2018), the most related results shown as follow:
$ pip search mysql-connector | grep ^mysql-connector
mysql-connector (2.1.6) - MySQL driver written in Python
mysql-connector-python (8.0.13) - MySQL driver written in Python
mysql-connector-repackaged (0.3.1) - MySQL driver written in Python
mysql-connector-async-dd (2.0.2) - mysql async connection
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver written in Python
mysql-connector (2.1.6)
is provided on PyPI when MySQL didn't provide their officialpip install
on PyPI at beginning (which was inconvenient). But it is a fork, and is stopped updating, sopip install mysql-connector
will install this obsolete version.
And now
mysql-connector-python (8.0.13)
on PyPI is the official package maintained by MySQL, so this is the one we should install.
add a comment |
To install the official MySQL Connector for Python, please use the name mysql-connector-python
:
pip install mysql-connector-python
Some further discussion, when we pip search
for mysql-connector
at this time (Nov, 2018), the most related results shown as follow:
$ pip search mysql-connector | grep ^mysql-connector
mysql-connector (2.1.6) - MySQL driver written in Python
mysql-connector-python (8.0.13) - MySQL driver written in Python
mysql-connector-repackaged (0.3.1) - MySQL driver written in Python
mysql-connector-async-dd (2.0.2) - mysql async connection
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver written in Python
mysql-connector (2.1.6)
is provided on PyPI when MySQL didn't provide their officialpip install
on PyPI at beginning (which was inconvenient). But it is a fork, and is stopped updating, sopip install mysql-connector
will install this obsolete version.
And now
mysql-connector-python (8.0.13)
on PyPI is the official package maintained by MySQL, so this is the one we should install.
To install the official MySQL Connector for Python, please use the name mysql-connector-python
:
pip install mysql-connector-python
Some further discussion, when we pip search
for mysql-connector
at this time (Nov, 2018), the most related results shown as follow:
$ pip search mysql-connector | grep ^mysql-connector
mysql-connector (2.1.6) - MySQL driver written in Python
mysql-connector-python (8.0.13) - MySQL driver written in Python
mysql-connector-repackaged (0.3.1) - MySQL driver written in Python
mysql-connector-async-dd (2.0.2) - mysql async connection
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver written in Python
mysql-connector (2.1.6)
is provided on PyPI when MySQL didn't provide their officialpip install
on PyPI at beginning (which was inconvenient). But it is a fork, and is stopped updating, sopip install mysql-connector
will install this obsolete version.
And now
mysql-connector-python (8.0.13)
on PyPI is the official package maintained by MySQL, so this is the one we should install.
edited Nov 13 '18 at 13:10
answered Nov 13 '18 at 1:58
YaOzIYaOzI
3,43822233
3,43822233
add a comment |
add a comment |
First install setuptools
sudo pip install setuptools
Then install mysql-connector
sudo pip install mysql-connector
If using Python3, then replace pip by pip3
add a comment |
First install setuptools
sudo pip install setuptools
Then install mysql-connector
sudo pip install mysql-connector
If using Python3, then replace pip by pip3
add a comment |
First install setuptools
sudo pip install setuptools
Then install mysql-connector
sudo pip install mysql-connector
If using Python3, then replace pip by pip3
First install setuptools
sudo pip install setuptools
Then install mysql-connector
sudo pip install mysql-connector
If using Python3, then replace pip by pip3
answered May 16 '18 at 19:11
user2459835user2459835
1
1
add a comment |
add a comment |
For Windows
pip install mysql-connector
For Ubuntu /Linux
sudo apt-get install python3-pymysql
add a comment |
For Windows
pip install mysql-connector
For Ubuntu /Linux
sudo apt-get install python3-pymysql
add a comment |
For Windows
pip install mysql-connector
For Ubuntu /Linux
sudo apt-get install python3-pymysql
For Windows
pip install mysql-connector
For Ubuntu /Linux
sudo apt-get install python3-pymysql
answered Sep 24 '18 at 16:05
Umesh YadavUmesh Yadav
115
115
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32754461%2fhow-to-install-mysql-connector-via-pip%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The official package name now is
mysql-connector-python
, so usepip install mysql-connector-python
– YaOzI
Nov 13 '18 at 2:00