7

I setup a virtualenv and then tried to install MySQL-Python using pip (after activating env). My requirements.txt is as following:

MySQL-python==1.2.5
argparse==1.2.1
pymongo==2.6.3
wsgiref==0.1.2

When I run pip install -r requirement.txt. I get some output last line of which is:

RuntimeError: maximum recursion depth exceeded

As mentioned in a post, I even ran this command to upgrade my distribute:

easy_install distribute==0.6.28

Even that didn't work. My python version (in env) is 2.7.6 and Machine is Ubuntu 14.04


UPDATE: Stack trace is as following:

Downloading/unpacking MySQL-python==1.2.5 (from -r requirements.txt (line 1))
  Running setup.py (path:/root/frrole_backend_raw_dump/env/build/MySQL-python/setup.py) egg_info for package MySQL-python
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/root/frrole_backend_raw_dump/env/build/MySQL-python/setup.py", line 21, in <module>
        setuptools.setup(**metadata)
      File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 225, in __init__
      File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 257, in finalize_options
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2029, in require
        self.name = name
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 580, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 825, in best_match
        ``installer(requirement)``, unless `installer` is None, in which case
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 837, in obtain
        def __iadd__(self, other):
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 272, in fetch_build_egg
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 225, in __init__
      File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 257, in finalize_options
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2029, in require
        self.name = name
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 580, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 825, in best_match
        ``installer(requirement)``, unless `installer` is None, in which case
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 837, in obtain
        def __iadd__(self, other):
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 272, in fetch_build_egg
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 225, in __init__
      File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 257, in finalize_options
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2029, in require
        self.name = name
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 580, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 825, in best_match
        ``installer(requirement)``, unless `installer` is None, in which case
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 837, in obtain
        def __iadd__(self, other):
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 272, in fetch_build_egg
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 225, in __init__
      File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 257, in finalize_options
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2029, in require
        self.name = name
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 580, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
2
  • Please post the complete traceback. Commented Mar 25, 2014 at 8:46
  • I'm seeing the exact same issue. @BurhanKhalid since it's an infinite loop most of the traceback is just more of the above. I'll let the OP edit the question to add the tail end of it. Commented Mar 29, 2014 at 19:50

1 Answer 1

4

Getting this too!

Some notes from my setup:

  • Ubuntu 13.10
    • Python-MySQLdb and libmysqlclient-dev are both installed via apt-get

I also see this, which I suspect is the root cause:

x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-Qunused-arguments’
x86_64-linux-gnu-gcc: error: unrecognized command line option ‘-Qunused-arguments’

EDIT:

Looks like I still get this (MySQL-Python 1.2.4) without a CFLAGS or CPPFLAGS environment variable set. 1.2.5 works for me.

Sign up to request clarification or add additional context in comments.

1 Comment

lololol, Thought those flags looked familiar :) My issue was a modification I made to my .bashrc as per this thread on my Mac. I copied my .bashrc over from that machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.