2017-04-21 15 views
1

thisと似ていますが、別のエラーが発生しました。インストールはDjango-Chronographで失敗しましたdjangoのpipで1.10

私はとのピップを経由してインストールしよう:私のpython 2.7を使用していますし、virtualenvの

pip freeze 
Django==1.10 
django-backbone==0.2.3 
django-jstemplate==1.1.1 
gunicorn==18.0 
MySQL-python==1.2.5 
six==1.10.0 
South==0.7.6 
unicodecsv==0.9.4 

エラー

pip install django-chronograph 

pip install django-chronograph 
Collecting django-chronograph 
    Using cached django-chronograph-0.3.1.tar.gz 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "/private/var/folders/87/h3ltndc5279cknk_vn9nzjjc0000gn/T/pip-build-_JDRxl/django-chronograph/setup.py", line 32, in <module> 
     setup_distribute() 
     File "/private/var/folders/87/h3ltndc5279cknk_vn9nzjjc0000gn/T/pip-build-_JDRxl/django-chronograph/setup.py", line 18, in setup_distribute 
     distribute_setup = __import__('distribute_setup') 
     File "distribute_setup.py", line 1 
     <html> 
     ^
    SyntaxError: invalid syntax 

    ---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/87/h3ltndc5279cknk_vn9nzjjc0000gn/T/pip-build-_JDRxl/django-chronograph/ 

答えて

1

問題はですインストールスクリプトはdjango-chronographによって提供されます。このコードブロックで https://bitbucket.org/wnielson/django-chronograph/src/f561106f6aaab62f2817e08e51c799320fd916d9/setup.py?at=default&fileviewer=file-view-default#setup.py-16

setup.pyのライン16で

は、それはスクリプトをダウンロードしようと

try: 
    import distribute_setup 
except: 
    # Make sure we have Distribute 
    if not os.path.exists('distribute_setup'): 
     urllib.urlretrieve('http://nightly.ziade.org/distribute_setup.py', 
          './distribute_setup.py') 

をしかし、あなたはhttp://nightly.ziade.org/distribute_setup.pyでURLを訪問したときに、それが404エラーになりますしたがって、返されたhtmlはエラーになります。

あなたがここに配布を取得することができるかもしれないように見えます:https://pypi.python.org/pypi/distribute/0.7.3

それとも、ジャンゴ・クロノグラフをインストールする前にこれをやってみてください:

pip install distribute 

幸運を!

+0

それは魅力のように、ありがとう。 –

関連する問題