How do I install oursql using pip?
I have been attempting to install oursql using pip (7.1.0, I installed it using sudo easy_install pip
as for my purposes the version provided by python-pip
is too old) via running:
sudo pip install oursql
but this returns the error:
Collecting oursql
Using cached oursql-0.9.3.1.tar.bz2
Building wheels for collected packages: oursql
Running setup.py bdist_wheel for oursql
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(open(__file__).read().replace('rn', 'n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpAakYx7pip-wheel-:
running bdist_wheel
running build
running build_ext
skipping 'oursqlx/oursql.c' Cython extension (up-to-date)
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
building 'oursql' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/oursqlx
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for oursql
Failed to build oursql
Installing collected packages: oursql
Running setup.py install for oursql
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-z5NtR4-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
skipping 'oursqlx/oursql.c' Cython extension (up-to-date)
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
building 'oursql' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-z5NtR4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-8AI16g/oursql
I have tried to follow this guide, but I hadn't the foggiest what I was meant to do with the MYSQL_CONFIG
variable as I have no idea what it should be set to. I also attempted running: sudo easy_install oursql
to install oursql but it too failed, giving:
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512:
PEP440Warning: 'python-apt (0.9.3.11build1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'PyECLib (1.0.5m)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'pygame (1.9.1release)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
Searching for oursql
Reading https://pypi.python.org/simple/oursql/
Reading http://launchpad.net/oursql
Best match: oursql 0.9.3.1
Downloading https://pypi.python.org/packages/source/o/oursql/oursql-0.9.3.1.zip#md5=ad599ea2d95fc695df7195e9801b45c2
Processing oursql-0.9.3.1.zip
Writing /tmp/easy_install-gejSuT/oursql-0.9.3.1/setup.cfg
Running oursql-0.9.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-gejSuT/oursql-0.9.3.1/egg-dist-tmp-N9kmGB
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
python mysql pip
add a comment |
I have been attempting to install oursql using pip (7.1.0, I installed it using sudo easy_install pip
as for my purposes the version provided by python-pip
is too old) via running:
sudo pip install oursql
but this returns the error:
Collecting oursql
Using cached oursql-0.9.3.1.tar.bz2
Building wheels for collected packages: oursql
Running setup.py bdist_wheel for oursql
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(open(__file__).read().replace('rn', 'n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpAakYx7pip-wheel-:
running bdist_wheel
running build
running build_ext
skipping 'oursqlx/oursql.c' Cython extension (up-to-date)
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
building 'oursql' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/oursqlx
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for oursql
Failed to build oursql
Installing collected packages: oursql
Running setup.py install for oursql
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-z5NtR4-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
skipping 'oursqlx/oursql.c' Cython extension (up-to-date)
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
building 'oursql' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-z5NtR4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-8AI16g/oursql
I have tried to follow this guide, but I hadn't the foggiest what I was meant to do with the MYSQL_CONFIG
variable as I have no idea what it should be set to. I also attempted running: sudo easy_install oursql
to install oursql but it too failed, giving:
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512:
PEP440Warning: 'python-apt (0.9.3.11build1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'PyECLib (1.0.5m)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'pygame (1.9.1release)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
Searching for oursql
Reading https://pypi.python.org/simple/oursql/
Reading http://launchpad.net/oursql
Best match: oursql 0.9.3.1
Downloading https://pypi.python.org/packages/source/o/oursql/oursql-0.9.3.1.zip#md5=ad599ea2d95fc695df7195e9801b45c2
Processing oursql-0.9.3.1.zip
Writing /tmp/easy_install-gejSuT/oursql-0.9.3.1/setup.cfg
Running oursql-0.9.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-gejSuT/oursql-0.9.3.1/egg-dist-tmp-N9kmGB
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
python mysql pip
3
It looks like you're missingmysql.h
which comes from thelibmysqlclient-dev
package.
– Timo
Aug 21 '15 at 11:08
add a comment |
I have been attempting to install oursql using pip (7.1.0, I installed it using sudo easy_install pip
as for my purposes the version provided by python-pip
is too old) via running:
sudo pip install oursql
but this returns the error:
Collecting oursql
Using cached oursql-0.9.3.1.tar.bz2
Building wheels for collected packages: oursql
Running setup.py bdist_wheel for oursql
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(open(__file__).read().replace('rn', 'n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpAakYx7pip-wheel-:
running bdist_wheel
running build
running build_ext
skipping 'oursqlx/oursql.c' Cython extension (up-to-date)
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
building 'oursql' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/oursqlx
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for oursql
Failed to build oursql
Installing collected packages: oursql
Running setup.py install for oursql
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-z5NtR4-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
skipping 'oursqlx/oursql.c' Cython extension (up-to-date)
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
building 'oursql' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-z5NtR4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-8AI16g/oursql
I have tried to follow this guide, but I hadn't the foggiest what I was meant to do with the MYSQL_CONFIG
variable as I have no idea what it should be set to. I also attempted running: sudo easy_install oursql
to install oursql but it too failed, giving:
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512:
PEP440Warning: 'python-apt (0.9.3.11build1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'PyECLib (1.0.5m)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'pygame (1.9.1release)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
Searching for oursql
Reading https://pypi.python.org/simple/oursql/
Reading http://launchpad.net/oursql
Best match: oursql 0.9.3.1
Downloading https://pypi.python.org/packages/source/o/oursql/oursql-0.9.3.1.zip#md5=ad599ea2d95fc695df7195e9801b45c2
Processing oursql-0.9.3.1.zip
Writing /tmp/easy_install-gejSuT/oursql-0.9.3.1/setup.cfg
Running oursql-0.9.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-gejSuT/oursql-0.9.3.1/egg-dist-tmp-N9kmGB
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
python mysql pip
I have been attempting to install oursql using pip (7.1.0, I installed it using sudo easy_install pip
as for my purposes the version provided by python-pip
is too old) via running:
sudo pip install oursql
but this returns the error:
Collecting oursql
Using cached oursql-0.9.3.1.tar.bz2
Building wheels for collected packages: oursql
Running setup.py bdist_wheel for oursql
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(open(__file__).read().replace('rn', 'n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpAakYx7pip-wheel-:
running bdist_wheel
running build
running build_ext
skipping 'oursqlx/oursql.c' Cython extension (up-to-date)
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
building 'oursql' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/oursqlx
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for oursql
Failed to build oursql
Installing collected packages: oursql
Running setup.py install for oursql
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-z5NtR4-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
skipping 'oursqlx/oursql.c' Cython extension (up-to-date)
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
building 'oursql' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c oursqlx/oursql.c -o build/temp.linux-x86_64-2.7/oursqlx/oursql.o
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-8AI16g/oursql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-z5NtR4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-8AI16g/oursql
I have tried to follow this guide, but I hadn't the foggiest what I was meant to do with the MYSQL_CONFIG
variable as I have no idea what it should be set to. I also attempted running: sudo easy_install oursql
to install oursql but it too failed, giving:
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512:
PEP440Warning: 'python-apt (0.9.3.11build1)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'PyECLib (1.0.5m)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2512: PEP440Warning: 'pygame (1.9.1release)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
PEP440Warning,
Searching for oursql
Reading https://pypi.python.org/simple/oursql/
Reading http://launchpad.net/oursql
Best match: oursql 0.9.3.1
Downloading https://pypi.python.org/packages/source/o/oursql/oursql-0.9.3.1.zip#md5=ad599ea2d95fc695df7195e9801b45c2
Processing oursql-0.9.3.1.zip
Writing /tmp/easy_install-gejSuT/oursql-0.9.3.1/setup.cfg
Running oursql-0.9.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-gejSuT/oursql-0.9.3.1/egg-dist-tmp-N9kmGB
warning: no usable mysql_config and no _winreg module to try; hopefully you have usable CFLAGS/LDFLAGS set.
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
python mysql pip
python mysql pip
edited Aug 20 '15 at 20:47
BH2017
asked Aug 20 '15 at 20:28
BH2017BH2017
3,6951860107
3,6951860107
3
It looks like you're missingmysql.h
which comes from thelibmysqlclient-dev
package.
– Timo
Aug 21 '15 at 11:08
add a comment |
3
It looks like you're missingmysql.h
which comes from thelibmysqlclient-dev
package.
– Timo
Aug 21 '15 at 11:08
3
3
It looks like you're missing
mysql.h
which comes from the libmysqlclient-dev
package.– Timo
Aug 21 '15 at 11:08
It looks like you're missing
mysql.h
which comes from the libmysqlclient-dev
package.– Timo
Aug 21 '15 at 11:08
add a comment |
3 Answers
3
active
oldest
votes
I found the solution myself, the guide I was following led me to believe that pip would do all the work for me (i.e., install all the necessary dependencies) but I needed to install the MySQL Connector C++ libraries (Ubuntu package name: libmysqlcppconn-dev
). So I ran sudo apt-get install libmysqlcppconn-dev
to install this package and afterwards sudo pip install oursql
ran without error. So Timo's comment was on the right track.
add a comment |
Install oursql in macOS.
So, here's the standard solution to be able to install oursql correctly in macOS.
brew install mysql@5.7
Now, follow all the instructions given at the end of the installation.
To run the secure installation(set password etc.), you'll need to go here and run /usr/local/mysql@5.7/bin/mysql_secure_installation
Now, once we have mysql installed, there are some dependency of the ourselves package like mysql-client
. You can install it with below command:
brew install mysql-client
After the installation follow the setup instructions given at the end of installation.
Don't forget to reload bash here. source ~/.bash_profile
Now, restart the mysql by brew service restart mysql
Now, at last first install mysqlclient with pip and then install oursql.
pip install mysqlclient
pip install oursql
All Good!
Are you aware this is AskUbuntu not AskmacOS (which doesn't exist, I know, making a point)? Hence I'm not asking how to do so on macOS, rather Ubuntu.
– BH2017
Oct 24 '18 at 8:14
Just like many users, I was redirected to this thread after many searches. So, I figured that this answer might help those in need. Otherwise Yes, I'm aware of this is AskUbuntu.
– Jay Modi
Oct 24 '18 at 9:00
add a comment |
I just had a similar issue installing oursql
in a virtualenv.
My output included a similar error to this part below (from the question):
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
Which led me to the solution in the accpeted answer of this stackoverflow question.
sudo apt install libmysqlclient-dev
fixed the issue in my case.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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%2faskubuntu.com%2fquestions%2f663919%2fhow-do-i-install-oursql-using-pip%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
I found the solution myself, the guide I was following led me to believe that pip would do all the work for me (i.e., install all the necessary dependencies) but I needed to install the MySQL Connector C++ libraries (Ubuntu package name: libmysqlcppconn-dev
). So I ran sudo apt-get install libmysqlcppconn-dev
to install this package and afterwards sudo pip install oursql
ran without error. So Timo's comment was on the right track.
add a comment |
I found the solution myself, the guide I was following led me to believe that pip would do all the work for me (i.e., install all the necessary dependencies) but I needed to install the MySQL Connector C++ libraries (Ubuntu package name: libmysqlcppconn-dev
). So I ran sudo apt-get install libmysqlcppconn-dev
to install this package and afterwards sudo pip install oursql
ran without error. So Timo's comment was on the right track.
add a comment |
I found the solution myself, the guide I was following led me to believe that pip would do all the work for me (i.e., install all the necessary dependencies) but I needed to install the MySQL Connector C++ libraries (Ubuntu package name: libmysqlcppconn-dev
). So I ran sudo apt-get install libmysqlcppconn-dev
to install this package and afterwards sudo pip install oursql
ran without error. So Timo's comment was on the right track.
I found the solution myself, the guide I was following led me to believe that pip would do all the work for me (i.e., install all the necessary dependencies) but I needed to install the MySQL Connector C++ libraries (Ubuntu package name: libmysqlcppconn-dev
). So I ran sudo apt-get install libmysqlcppconn-dev
to install this package and afterwards sudo pip install oursql
ran without error. So Timo's comment was on the right track.
answered Aug 21 '15 at 18:10
BH2017BH2017
3,6951860107
3,6951860107
add a comment |
add a comment |
Install oursql in macOS.
So, here's the standard solution to be able to install oursql correctly in macOS.
brew install mysql@5.7
Now, follow all the instructions given at the end of the installation.
To run the secure installation(set password etc.), you'll need to go here and run /usr/local/mysql@5.7/bin/mysql_secure_installation
Now, once we have mysql installed, there are some dependency of the ourselves package like mysql-client
. You can install it with below command:
brew install mysql-client
After the installation follow the setup instructions given at the end of installation.
Don't forget to reload bash here. source ~/.bash_profile
Now, restart the mysql by brew service restart mysql
Now, at last first install mysqlclient with pip and then install oursql.
pip install mysqlclient
pip install oursql
All Good!
Are you aware this is AskUbuntu not AskmacOS (which doesn't exist, I know, making a point)? Hence I'm not asking how to do so on macOS, rather Ubuntu.
– BH2017
Oct 24 '18 at 8:14
Just like many users, I was redirected to this thread after many searches. So, I figured that this answer might help those in need. Otherwise Yes, I'm aware of this is AskUbuntu.
– Jay Modi
Oct 24 '18 at 9:00
add a comment |
Install oursql in macOS.
So, here's the standard solution to be able to install oursql correctly in macOS.
brew install mysql@5.7
Now, follow all the instructions given at the end of the installation.
To run the secure installation(set password etc.), you'll need to go here and run /usr/local/mysql@5.7/bin/mysql_secure_installation
Now, once we have mysql installed, there are some dependency of the ourselves package like mysql-client
. You can install it with below command:
brew install mysql-client
After the installation follow the setup instructions given at the end of installation.
Don't forget to reload bash here. source ~/.bash_profile
Now, restart the mysql by brew service restart mysql
Now, at last first install mysqlclient with pip and then install oursql.
pip install mysqlclient
pip install oursql
All Good!
Are you aware this is AskUbuntu not AskmacOS (which doesn't exist, I know, making a point)? Hence I'm not asking how to do so on macOS, rather Ubuntu.
– BH2017
Oct 24 '18 at 8:14
Just like many users, I was redirected to this thread after many searches. So, I figured that this answer might help those in need. Otherwise Yes, I'm aware of this is AskUbuntu.
– Jay Modi
Oct 24 '18 at 9:00
add a comment |
Install oursql in macOS.
So, here's the standard solution to be able to install oursql correctly in macOS.
brew install mysql@5.7
Now, follow all the instructions given at the end of the installation.
To run the secure installation(set password etc.), you'll need to go here and run /usr/local/mysql@5.7/bin/mysql_secure_installation
Now, once we have mysql installed, there are some dependency of the ourselves package like mysql-client
. You can install it with below command:
brew install mysql-client
After the installation follow the setup instructions given at the end of installation.
Don't forget to reload bash here. source ~/.bash_profile
Now, restart the mysql by brew service restart mysql
Now, at last first install mysqlclient with pip and then install oursql.
pip install mysqlclient
pip install oursql
All Good!
Install oursql in macOS.
So, here's the standard solution to be able to install oursql correctly in macOS.
brew install mysql@5.7
Now, follow all the instructions given at the end of the installation.
To run the secure installation(set password etc.), you'll need to go here and run /usr/local/mysql@5.7/bin/mysql_secure_installation
Now, once we have mysql installed, there are some dependency of the ourselves package like mysql-client
. You can install it with below command:
brew install mysql-client
After the installation follow the setup instructions given at the end of installation.
Don't forget to reload bash here. source ~/.bash_profile
Now, restart the mysql by brew service restart mysql
Now, at last first install mysqlclient with pip and then install oursql.
pip install mysqlclient
pip install oursql
All Good!
answered Oct 24 '18 at 8:04
Jay ModiJay Modi
27124
27124
Are you aware this is AskUbuntu not AskmacOS (which doesn't exist, I know, making a point)? Hence I'm not asking how to do so on macOS, rather Ubuntu.
– BH2017
Oct 24 '18 at 8:14
Just like many users, I was redirected to this thread after many searches. So, I figured that this answer might help those in need. Otherwise Yes, I'm aware of this is AskUbuntu.
– Jay Modi
Oct 24 '18 at 9:00
add a comment |
Are you aware this is AskUbuntu not AskmacOS (which doesn't exist, I know, making a point)? Hence I'm not asking how to do so on macOS, rather Ubuntu.
– BH2017
Oct 24 '18 at 8:14
Just like many users, I was redirected to this thread after many searches. So, I figured that this answer might help those in need. Otherwise Yes, I'm aware of this is AskUbuntu.
– Jay Modi
Oct 24 '18 at 9:00
Are you aware this is AskUbuntu not AskmacOS (which doesn't exist, I know, making a point)? Hence I'm not asking how to do so on macOS, rather Ubuntu.
– BH2017
Oct 24 '18 at 8:14
Are you aware this is AskUbuntu not AskmacOS (which doesn't exist, I know, making a point)? Hence I'm not asking how to do so on macOS, rather Ubuntu.
– BH2017
Oct 24 '18 at 8:14
Just like many users, I was redirected to this thread after many searches. So, I figured that this answer might help those in need. Otherwise Yes, I'm aware of this is AskUbuntu.
– Jay Modi
Oct 24 '18 at 9:00
Just like many users, I was redirected to this thread after many searches. So, I figured that this answer might help those in need. Otherwise Yes, I'm aware of this is AskUbuntu.
– Jay Modi
Oct 24 '18 at 9:00
add a comment |
I just had a similar issue installing oursql
in a virtualenv.
My output included a similar error to this part below (from the question):
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
Which led me to the solution in the accpeted answer of this stackoverflow question.
sudo apt install libmysqlclient-dev
fixed the issue in my case.
New contributor
add a comment |
I just had a similar issue installing oursql
in a virtualenv.
My output included a similar error to this part below (from the question):
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
Which led me to the solution in the accpeted answer of this stackoverflow question.
sudo apt install libmysqlclient-dev
fixed the issue in my case.
New contributor
add a comment |
I just had a similar issue installing oursql
in a virtualenv.
My output included a similar error to this part below (from the question):
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
Which led me to the solution in the accpeted answer of this stackoverflow question.
sudo apt install libmysqlclient-dev
fixed the issue in my case.
New contributor
I just had a similar issue installing oursql
in a virtualenv.
My output included a similar error to this part below (from the question):
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
#include "mysql.h"
^
compilation terminated.
Which led me to the solution in the accpeted answer of this stackoverflow question.
sudo apt install libmysqlclient-dev
fixed the issue in my case.
New contributor
New contributor
answered 2 hours ago
nog642nog642
12
12
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f663919%2fhow-do-i-install-oursql-using-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
3
It looks like you're missing
mysql.h
which comes from thelibmysqlclient-dev
package.– Timo
Aug 21 '15 at 11:08