安装django-imagekit时遇到问题 - 'execfile'未定义

时间:2013-11-19 11:00:53

标签: python django python-3.x django-imagekit

我在python 3.2 / django 1.5下安装django-imagekit时遇到问题。 django-imagekit只适用于python 2(那为什么它在pip-3.2中可用)?

尝试从我的virtualenv中安装django-imagekit。

------------------------------------------------------------
/home/testuser/webapps/app/bin/pip run on Tue Nov 19 10:38:45 2013
Downloading/unpacking django-imagekit

  Running setup.py egg_info for package django-imagekit

    Traceback (most recent call last):

      File "<string>", line 14, in <module>

      File "/home/testuser/webapps/app/build/django-imagekit/setup.py", line 25, in <module>

        execfile(os.path.join(os.path.dirname(__file__),

    NameError: name 'execfile' is not defined

    Complete output from command python setup.py egg_info:

    Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/home/testuser/webapps/app/build/django-imagekit/setup.py", line 25, in <module>

    execfile(os.path.join(os.path.dirname(__file__),

NameError: name 'execfile' is not defined

----------------------------------------

Command python setup.py egg_info failed with error code 1 in /home/testuser/webapps/app/build/django-imagekit

Exception information:
Traceback (most recent call last):
  File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/basecommand.py", line 104, in main
    status = self.run(options, args)
  File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/commands/install.py", line 245, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/req.py", line 1009, in prepare_files
    req_to_install.run_egg_info()
  File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/req.py", line 225, in run_egg_info
    req_to_install.run_egg_info()
  File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/req.py", line 225, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/__init__.py", line 256, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in /home/testuser/webapps/app/build/django-imagekit

2 个答案:

答案 0 :(得分:0)

看起来这个模块还没有为python3更新过。自1.5以来,Django才正式支持python3,所以有几个软件包尚未更新。

答案 1 :(得分:0)

我是django-imagekit的维护者,不幸的是,它还没有为Python 3做好准备。至于为什么pip-3.2“可用”...我的理解是pip不会根据你正在使用的Python版本对包进行任何过滤; pip-3.2以这种方式命名,因为它将软件包安装到Python 3.2中,但它不使用单独的索引。

修改

我们刚推送了支持Python 3的ImageKit 3.2!试一试(: