2013-07-02 27 views
2

這是我第一次在我的Windows 7上使用easy_install。我想用它安裝DjangoSEO。但它顯示一個錯誤。我有Python2.7(32位)。任何人都可以幫助我嗎?無法使用easy_install安裝DjangoSEO

C:\Users\hl>easy_install DjangoSEO 
Searching for DjangoSEO 
Reading http://pypi.python.org/simple/DjangoSEO/ 
Best match: DjangoSEO 1.0 
Downloading http://pypi.python.org/packages/source/D/DjangoSEO/DjangoSEO-1.0.ta 
.gz#md5=69cd65eb3a9d716b5ba067b1a4e63735 
Processing DjangoSEO-1.0.tar.gz 
Running DjangoSEO-1.0\setup.py -q bdist_egg --dist-dir c:\users\hl\appdata\loca 
\temp\easy_install-nb1z4k\DjangoSEO-1.0\egg-dist-tmp-_nez8j 
Traceback (most recent call last): 
File "C:\Python27\Scripts\easy_install-script.py", line 8, in <module> 
load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')() 
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 1676, i 
main 

File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 1664, i 
with_ei_usage 

File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 1680, i 
<lambda> 

File "C:\Python27\lib\distutils\core.py", line 152, in setup 
dist.run_commands() 
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands 
self.run_command(cmd) 
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command 
cmd_obj.run() 
File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 211, in 
run 

File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 446, in 
easy_install 

File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 476, in 
install_item 

File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 655, in 
install_eggs 

File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 932, in 
build_and_install 

File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 921, in 
run_setup 

File "build\bdist.win32\egg\setuptools\sandbox.py", line 26, in run_setup 
File "build\bdist.win32\egg\setuptools\sandbox.py", line 66, in run 
File "build\bdist.win32\egg\setuptools\sandbox.py", line 28, in <lambda> 
File "setup.py", line 35, in <module> 
description="pip installs packages. Python packages. An easy_install replac 
ment", 
File "C:\Python27\lib\distutils\core.py", line 112, in setup 
_setup_distribution = dist = klass(attrs) 
File "build\bdist.win32\egg\setuptools\dist.py", line 223, in __init__ 
File "C:\Python27\lib\distutils\dist.py", line 287, in __init__ 
self.finalize_options() 
File "build\bdist.win32\egg\setuptools\dist.py", line 256, in finalize_option 

    File "build\bdist.win32\egg\pkg_resources.py", line 1916, in load 
    than any other pre-release tag. 
ImportError: <module 'setuptools.dist' from 'C:\Python27\lib\site-packages\dist 
ibute-0.6-py2.7.egg\setuptools\dist.pyc'> has no 'check_packages' attribute 

回答

0

我刪除了sitepackages中的所有setuptools文件和easy_install文件。然後從http://python-distribute.org/下載distribute_setup.py使用python運行它,並使用pip來安裝djang-seo。它解決了問題