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