无法运行django-admin

时间:2015-10-03 22:23:15

标签: django ubuntu

我无法在Ubuntu服务器上运行django admin。请注意,我之前创建了一个django项目。 我正确安装了python和django:

user@server:~$ python -c "import django; print(django.get_version())"
1.8.4*

我收到以下错误:

user@server:~$ django-admin
Traceback (most recent call last):
  File "/usr/local/bin/django-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2672, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 654, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 552, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Django==1.8.4

我可能做错了什么?

1 个答案:

答案 0 :(得分:1)

我在@okuznetsov的帮助下解决了这个问题。 我需要升级django。

user@server:~$ sudo easy_install --upgrade django