First time here? Check out the FAQ!

Troubleshooting "__import__() takes no keyword arguments" when installing

Whenever I try to install AskBot (following I get

Processing python-daemon-1.6.tar.gz
Running python-daemon-1.6/ -q bdist_egg --dist-dir /tmp/easy_install-HI8VO8/python-daemon-1.6/egg-dist-tmp-K0eK6T
Traceback (most recent call last):
  File "", line 50, in ?
    long_description = """Askbot will work alone or with other django apps (with some limitations, please see below), Django 1.1.1 - 1.2.3(*), MySQL(**) and PostgresQL(recommended) (>=8.3).
  File "/usr/lib64/python2.4/distutils/", line 149, in setup
  File "/usr/lib64/python2.4/distutils/", line 946, in run_commands
  File "/usr/lib64/python2.4/distutils/", line 966, in run_command
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 76, in run
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 104, in do_egg_install
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 211, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 427, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 478, in install_item
    self.process_distribution(spec, dist, deps)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 518, in process_distribution
    distros = WorkingSet([]).resolve(
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/", line 563, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/", line 799, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/", line 811, in obtain
    return installer(requirement)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 446, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 476, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 655, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 930, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/", line 919, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/", line 61, in run_setup
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/", line 105, in run
    return func()
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/", line 64, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "", line ...
GtoXic's avatar
asked 2012-09-14 10:30:48 -0500
Evgeny's avatar
updated 2012-09-16 14:44:36 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


Askbot will not work with python 2.4, please install latest python as "altinstall".

Make sure to have your updated python not overwrite python 2.4 as CentOS depends on an older version of Python. I think later releases of CentOS have fixed this problem.

One option will be to find a system package of python 2.6 or 2.7 for your version of the system, another option - compile Python from source code and install with make altinstall - in order to not overwrite Python 2.4.

Finally - you might either upgrade your CentOS or get a server with a distribution where at least python 2.6 is natively provided.

Evgeny's avatar
answered 2012-09-16 14:43:45 -0500
edit flag offensive 0 remove flag delete link


Would installing the Python 3.x branch work or is it just the 2.x branch?

finid's avatar finid (2012-10-14 16:54:40 -0500) edit

Askbot does not work with python 3.x at this time. We will work on that by the time django fully supports python 3. The latest python 2.7 will work best.

Evgeny's avatar Evgeny (2012-10-14 18:54:49 -0500) edit
add a comment see more comments