mysql-python

pip install MySQL-python fails on ubuntu 14.04, error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

爱⌒轻易说出口 提交于 2019-12-02 08:41:23
问题 I've read all the stack overflow / google recommendations of package lists to install and none of them seem to resolved this. Migrating an ubuntu 14.04 webserver from a US hosting provider to DigitalOcean in Europe, both are configured with the same Ansible playbook but there must be something pre-installed on the instance in the US as MySQL-python==1.2.5 installs fine there. apt-get build-essential python-dev python-pip libssl-dev libmariadbclient-dev pip install MySQL-python When I first

Segmentation fault error in a multi threaded app in python

↘锁芯ラ 提交于 2019-12-02 08:01:48
I have a multi threaded app in python, wherein I create multiple producer threads and they extract the data from DB. Data is extracted in chunks. So the part where a thread creates sql statement with limit values is kept within lock. And to let threads execute queries simultaneously, query() function is kept outside the lock. Then the result fetching part is again kept under the lock. Below is the code snippet: with UserAgent.lock: sqlGeoTarget = "call sp_ax_ari_select_user_agent_list('0'," + str(self.chunkStart) + "," + str(self.chunkSize) + ",1);" self.chunkStart += self.chunkSize self.dbObj

“OSError: mysql_config not found” when trying to “pip install mysqlclient” - Django

戏子无情 提交于 2019-12-02 07:21:56
问题 I'm relatively new to Django, and Web Development in general. I am trying to pip install mysqlclient in my virtualenv -p python3 to hook up Django 2.0 to mySQL. However, I'm getting this error: Collecting mysqlclient Using cached mysqlclient-1.3.12.tar.gz Complete output from command python setup.py egg_info: /bin/sh: mysql_config: command not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/43/md5vpqrx0mx8627sq04slbz00000gn/T/pip-build

Getting peewee to work on elastic beanstalk

点点圈 提交于 2019-12-02 04:24:32
I'm trying to install the peewee package on an elastic beanstalk instance to control a bottle application. I think the problem is with the MySQL-python dependency, but peewee doesn't load either. My requirements file looks like this: bottle==0.11.6 peewee==2.1.1 MySQL-python I also tried MySQL-python as MySQL-python==1.2.4b4 . For a number of reasons which I believe are summed up here , this doesn't work; peewee isn't installed and I get this error message in the log: 2013-05-18 06:57:08,407 [INFO] (15947 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Script

How to execute multi query in python?

自作多情 提交于 2019-12-02 04:15:45
问题 I want to execute the sql_query given in below function and doing this way : def get_globalid(self): cursor = self.connect() sql_query = "REPLACE INTO globalid (stub) VALUES ('a'); SELECT LAST_INSERT_ID() as id" cursor = self.query(sql_query, cursor) for row in cursor: actionid = row[0] return actionid connect() function I am using to make a connection and it is defined separately .The query function i am using above is to execute any query passed to it . It is defined as : def query(self

Mac OSX : python packages failed to build because of gcc issues

天涯浪子 提交于 2019-12-02 04:00:47
I am trying to install MySQL-python package with the following error: cc1: error: unrecognized command line option "-arch" cc1: error: unrecognized command line option "-Wno-long-double" error: Setup script exited with error: command 'gcc' failed with exit status 1 I am using Mac OSX version 10.6.8 with gcc bash-3.2$ gcc --version gcc (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) How can I resolve the this issue? thanks I restored the gcc that comes with Mac and that removed the first error which is cc1: error: unrecognized command line option "-arch" for the second one, I removed the option

MySQL-python install failed with exit status 1120

拟墨画扇 提交于 2019-12-02 02:54:25
So I tried running pip3 install MySQL-python and I got these error messages mysqlclient.lib(typelib.obj) : error LNK2001: unresolved external symbol ___iob_func mysqlclient.lib(viosslfactories.obj) : error LNK2001: unresolved external symbol ___iob_func mysqlclient.lib(my_winfile.obj) : error LNK2001: unresolved external symbol ___iob_func mysqlclient.lib(my_messnc.obj) : error LNK2001: unresolved external symbol ___iob_func mysqlclient.lib(client.obj) : error LNK2001: unresolved external symbol ___iob_func mysqlclient.lib(my_thr_init.obj) : error LNK2001: unresolved external symbol ___iob

cxFreeze error: resource_filename() only supported for .egg not .zipp

ⅰ亾dé卋堺 提交于 2019-12-02 01:51:05
问题 I have a fully working wxpython based application, written all in Python. I wanted to make an exe, so I used cxFreeze. During the build, there are many modules which seem to be missing, which sometimes should not make a problem, but when I run the application it gives me an error from MySQLdb module: NotImplementedError: resource_filename() only supported for .egg not .zip I have a .egg for MySQL at Python 2.7 / Lib / Site-Packages. Any help or suggestions are highly appreciated. Thanks! 回答1:

MySQL-python install failed with exit status 1120

核能气质少年 提交于 2019-12-01 22:14:20
问题 So I tried running pip3 install MySQL-python and I got these error messages mysqlclient.lib(typelib.obj) : error LNK2001: unresolved external symbol ___iob_func mysqlclient.lib(viosslfactories.obj) : error LNK2001: unresolved external symbol ___iob_func mysqlclient.lib(my_winfile.obj) : error LNK2001: unresolved external symbol ___iob_func mysqlclient.lib(my_messnc.obj) : error LNK2001: unresolved external symbol ___iob_func mysqlclient.lib(client.obj) : error LNK2001: unresolved external

How to install MySQL-python by pip?

旧时模样 提交于 2019-12-01 21:59:21
问题 venv/bin/pip install MySQL-python Collecting MySQL-python Downloading MySQL-python-1.2.5.zip (108kB) 100% |████████████████████████████████| 112kB 1.2MB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/1j/pb3h7_hn4490px72_f8mntd00000gn/T/pip-build-o66zhy67/MySQL-python/setup.py", line 13, in <module> from setup_posix import get_config File "/private/var/folders/1j/pb3h7_hn4490px72