top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Install MySQL-python failed?

+1 vote
530 views

$ python -m pip install MySQL-python

Collecting MySQL-python
 Downloading MySQL-python-1.2.5.zip (108kB)
 100% | –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ –ˆ| 112kB 260kB/s
 930 [main] python2.7 12948 child_info_fork::abort: address space needed by 'datetime.dll' (0x870000) is already occupied
 Error [Errno 11] Resource temporarily unavailable while executing command python setup.py egg_info
Exception:
Traceback (most recent call last):
 File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
 status = self.run(options, args)
 File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
 requirement_set.prepare_files(finder)
 File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
 ignore_dependencies=self.ignore_dependencies))
 File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
 abstract_dist.prep_for_dist()
 File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
 self.req_to_install.run_egg_info()
 File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 439, in run_egg_info
 command_desc='python setup.py egg_info')
 File "/usr/lib/python2.7/site-packages/pip/utils/__init__.py", line 667, in call_subprocess
 cwd=cwd, env=env)
 File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
 errread, errwrite)
 File "/usr/lib/python2.7/subprocess.py", line 917, in _execute_child
 self.pid = os.fork()
OSError: [Errno 11] Resource temporarily unavailable

Anyone hit similar issue?

posted Apr 5, 2018 by Ramakrishnan

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
Is this happening in cygwin? Or in a native linux?

Similar Questions
+3 votes

I am using Python 2.7, MySQl 5.5, mysqldb(driver) and trying to connect to the mysql db using Python.

What I have tried

import MySQLdb
db = MySQLdb.connect(host="localhost",
                     user="root", # username
                      passwd="xxxxx", #  password
                      db="TEST") # name of the data base

Even tried 127.0.0.1 as local host

#ERROR
Traceback (most recent call last):
  File "C:/Python27/connect.py", line 6, in <module>
    db="prakash") # name of the data base
  File "C:\Python27\lib\site-packages\MySQLdb\__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
  OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")

I am new to python, please help how to proceed?

+1 vote

Is there a way to make python script that connects to mySQL DB ask for a password on the:

conn = mdb.connect(host, user)
0 votes

I am having trouble matching Python data types with those of MySQL. MySQL has about 7 basic data types including Blobs, Binaries, etc. It also has a rich selection of geometry types. In addition, types like INT have 7 or 8 different options like Primary Key, zero fill, auto inc, etc. I can't seem to find anything in python to match these. I am trying to build a model.py for an existing database that was created with MySQL Workbench.

I do not wish to use anything other than MySQL because of the complexity of my storage needs (searchable text, PDF, Audio, Video and Photos). The text searches will often be word phrase searches through thousands of documents. I need the speed and the data type flexibility.

How do I build or modify a model.py to do this. I really don't want to write a model.py manually. That would really be a major pain. Workbench to the database an import to Django and edit is my choice. Unfortunately, the model.py produced has lost most of the functionality of the original database and I can't seem to figure out how to fix it.

0 votes

What is the proper way in which I can execute dynamic MySQL queries in Python? I want to do dynamic queries for both CREATE and INSERT statement.
Here is my attempted code:

sql="create table %s (%%s, %%s, %%s ... )" % (tablename,''.join(fields)+' '.join(types))
cur.execute(sql) 

where 'field' is the fieldnames stored in a list and 'types' are the fieldtypes stored in a list.

0 votes

I'm starting a new project from scratch so I think its finally a time to switch to the latest and greatest Python 3.4.

But I'm puzzled with MySQL support for Python 3. So far the only stable library I've found it pymysql.

All others are either abandoned work-in-progress projects or do not support Python 3:

  • mysqldb - Python 2.x only
  • mysql-ctypes - Python 2.x only
  • amysql - Python 2.x only
  • ultramysql - Python 2.x only
  • MySQL Connector/Python - new guy in block. Does anyone use it?
  • WebScaleSQL + MySQLdb1 - still in development, state unknown?

So what library do you use for MySQL access in Python 3? I'm specifically interested in async support (like in psycopg2 for PostgreSQL) since I'm planning to use Tornado.

...