0

我在 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
4

2 回答 2

0

看起来这个模块还没有为 python3 更新。Django 从 1.5 开始才正式支持 python3,所以有几个包还没有更新。

于 2013-11-19T13:16:04.743 回答
0

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

编辑:

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

于 2013-11-20T15:06:52.820 回答