Ask Your Question
1

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

asked 2012-09-14 10:30:48 -0500

GtoXic gravatar image GtoXic
11 1

updated 2012-09-16 14:44:36 -0500

Evgeny gravatar image Evgeny flag of Chile
11009 50 84 182
http://askbot.org/

Whenever I try to install AskBot (following http://askbot.org/doc/install.html) I get

Processing python-daemon-1.6.tar.gz
Running python-daemon-1.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-HI8VO8/python-daemon-1.6/egg-dist-tmp-K0eK6T
Traceback (most recent call last):
  File "setup.py", 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/core.py", line 149, in setup
    dist.run_commands()
  File "/usr/lib64/python2.4/distutils/dist.py", line 946, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.4/distutils/dist.py", line 966, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/install.py", line 76, in run
    self.do_egg_install()
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/install.py", line 104, in do_egg_install
    cmd.run()
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", 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/easy_install.py", 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/easy_install.py", 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/easy_install.py", line 518, in process_distribution
    distros = WorkingSet([]).resolve(
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/pkg_resources.py", 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/pkg_resources.py", 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/pkg_resources.py", line 811, in obtain
    return installer(requirement)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/command/easy_install.py", 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/easy_install.py", 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/easy_install.py", 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/easy_install.py", 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/easy_install.py", 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/sandbox.py", line 61, in run_setup
    DirectorySandbox(setup_dir).run(
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/sandbox.py", line 105, in run
    return func()
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c12dev_r88846-py2.4.egg/setuptools/sandbox.py", line 64, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 22, in ?
    'askbot-setup = askbot.deployment:askbot_setup',
TypeError: __import__() takes no keyword arguments

I'm running this on CentOS 5.4 with Apache2 and Python 2.4.3.

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-09-16 14:43:45 -0500

Evgeny gravatar image Evgeny flag of Chile
11009 50 84 182
http://askbot.org/

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.

link publish delete flag offensive edit

Comments

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

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 ( 2012-10-14 18:54:49 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow
1 follower

subscribe to rss feed

Stats

Asked: 2012-09-14 10:30:48 -0500

Seen: 98 times

Last updated: Sep 16 '12