没有名为django_select2的模块

时间:2018-02-17 13:12:54

标签: python django

我正在尝试从django-SHOP框架运行一个示例。按照他们运行示例的教程,我收到以下错误:

    Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute
    django.setup()
  File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/home/agozie/anaconda3/envs/env1/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
    module = import_module(entry)
  File "/home/agozie/anaconda3/envs/env1/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named django_select2

我已经安装了django_select2但它仍然会抛出错误。有什么想法吗?

通过conda安装条带会引发错误

  

CondaValueError:参数太少,必须提供命令行软件包规范或--file

1 个答案:

答案 0 :(得分:0)

是否已安装?

请运行:

pip install django_select2

如果你正在使用anaconda,请尝试:

conda install -c django_select2

你也可以这样做:

activate /home/agozie/anaconda3/envs/env1
pip install django_select2