Django专案找不到webpack_loader

时间:2018-09-22 23:48:22

标签: django webpack

我正在尝试运行此项目https://github.com/v1k45/ponynote,但是运行api时出现错误。我使用python 3.6来运行它,因为最新的python不会运行Django 1.11。

$ python manage.py runserver
Unhandled exception in thread started by <function wrapper at 0x103b5b500>
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 113, in inner_run
    autoreload.raise_last_exception()
  File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
    six.reraise(*_exception)
  File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/usr/local/lib/python2.7/site-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named webpack_loader

有什么问题吗?

1 个答案:

答案 0 :(得分:0)

该错误提及python 2.7。原来我没有在pipenv中正确设置python版本。解决方案

pipenv install -r requirements.txt --python 3.6.6