2 kevin samuel Kevin_Samuel 于 2015.07.11 00:10 提问

django安装后使用 mange.py错误,求解 20C

在ubuntu下安装了django 1.9, 使用manage.py时有报错:(python版本为2.7和3.4)
比如./manage.py runserver 8888

 fenice@fenice:~/WorkSpace/django/mysite$ ./manage.py startapp blog
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/core/management/__init__.py", line 331, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/core/management/__init__.py", line 305, in execute
    django.setup()
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/apps/registry.py", line 115, in populate
    app_config.ready()
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/admin/apps.py", line 22, in ready
    self.module.autodiscover()
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/admin/__init__.py", line 26, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/utils/module_loading.py", line 50, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/auth/admin.py", line 7, in <module>
    from django.contrib.auth.forms import (
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/auth/forms.py", line 259, in <module>
    class SetPasswordForm(forms.Form):
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/auth/forms.py", line 269, in SetPasswordForm
    help_text=password_validation.password_validators_help_text_html())
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/auth/password_validation.py", line 85, in password_validators_help_text_html
    help_texts = password_validators_help_texts(password_validators)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/auth/password_validation.py", line 74, in password_validators_help_texts
    password_validators = get_default_password_validators()
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/utils/lru_cache.py", line 101, in wrapper
    result = user_function(*args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/auth/password_validation.py", line 21, in get_default_password_validators
    return get_password_validators(settings.AUTH_PASSWORD_VALIDATORS)
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/auth/password_validation.py", line 32, in get_password_validators
    validators.append(klass(**validator.get('OPTIONS', {})))
  File "/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/auth/password_validation.py", line 164, in __init__
    with open(password_list_path) as f:
IOError: [Errno 2] No such file or directory: u'/usr/local/lib/python2.7/dist-packages/Django-1.9.dev20150709131027-py2.7.egg/django/contrib/auth/common-passwords.txt.gz'

2个回答

oyljerry
oyljerry   Ds   Rxr 2015.07.11 22:01

打开密码文件时找不到它对应的路径,没有这个文件。

Kevin_Samuel
Kevin_Samuel 应该怎么解决呢?
2 年多之前 回复
CSDNXIAOD
CSDNXIAOD   2015.07.16 15:22

如何使用和制作 Python 安装模块(setup.py)
如何使用和制作 Python 安装模块(setup.py)
----------------------biu~biu~biu~~~在下问答机器人小D,这是我依靠自己的聪明才智给出的答案,如果不正确,你来咬我啊!

Csdn user default icon
上传中...
上传图片
插入图片