Forums

ModuleNotFoundError: No module named 'ckeditor'

I'm trying to include ckeditor in my web app, but I get an error message of

ModuleNotFoundError: No module named 'ckeditor'

I think I've already installed ckeditor by

pip3.6 install --user ckeditor

and also in my virtualenv.

Whenever I try installing, the console says ckeditor is already installed.

But I'm getting that error message over and over again.

Could you give me some help?

Can we get the full stacktrace?

2019-01-21 16:41:52,721: Error running WSGI application

2019-01-21 16:41:52,722: ModuleNotFoundError: No module named 'ckeditor'

2019-01-21 16:41:52,723:   File "/var/www/ehdals56_pythonanywhere_com_wsgi.py", line 12, in <module>

2019-01-21 16:41:52,723:     application = StaticFilesHandler(get_wsgi_application())

2019-01-21 16:41:52,723:

2019-01-21 16:41:52,724:   File "/home/ehdals56/GLIF_Website_Project/virtualenv/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application

2019-01-21 16:41:52,724:     django.setup(set_prefix=False)

2019-01-21 16:41:52,724:

2019-01-21 16:41:52,725:   File "/home/ehdals56/GLIF_Website_Project/virtualenv/lib/python3.6/site-packages/django/__init__.py", line 24, in setup

2019-01-21 16:41:52,725:     apps.populate(settings.INSTALLED_APPS)

2019-01-21 16:41:52,725:

2019-01-21 16:41:52,725:   File "/home/ehdals56/GLIF_Website_Project/virtualenv/lib/python3.6/site-packages/django/apps/registry.py", line 89, in populate

2019-01-21 16:41:52,726:     app_config = AppConfig.create(entry)

2019-01-21 16:41:52,726:

2019-01-21 16:41:52,726:   File "/home/ehdals56/GLIF_Website_Project/virtualenv/lib/python3.6/site-packages/django/apps/config.py", line 90, in create

2019-01-21 16:41:52,726:     module = import_module(entry)

I appreciate your help. Thanks in advance.

2019-01-21 16:41:52,721: Error running WSGI application

2019-01-21 16:41:52,722: ModuleNotFoundError: No module named 'ckeditor'

2019-01-21 16:41:52,723:   File "/var/www/ehdals56_pythonanywhere_com_wsgi.py", line 12, in <module>

2019-01-21 16:41:52,723:     application = StaticFilesHandler(get_wsgi_application())

2019-01-21 16:41:52,723:

2019-01-21 16:41:52,724:   File "/home/ehdals56/GLIF_Website_Project/virtualenv/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application

2019-01-21 16:41:52,724:     django.setup(set_prefix=False)

2019-01-21 16:41:52,724:

2019-01-21 16:41:52,725:   File "/home/ehdals56/GLIF_Website_Project/virtualenv/lib/python3.6/site-packages/django/__init__.py", line 24, in setup

2019-01-21 16:41:52,725:     apps.populate(settings.INSTALLED_APPS)

2019-01-21 16:41:52,725:

2019-01-21 16:41:52,725:   File "/home/ehdals56/GLIF_Website_Project/virtualenv/lib/python3.6/site-packages/django/apps/registry.py", line 89, in populate

2019-01-21 16:41:52,726:     app_config = AppConfig.create(entry)

2019-01-21 16:41:52,726:

2019-01-21 16:41:52,726:   File "/home/ehdals56/GLIF_Website_Project/virtualenv/lib/python3.6/site-packages/django/apps/config.py", line 90, in create

2019-01-21 16:41:52,726:     module = import_module(entry)

This is what I've got. Thanks a lot.

ckeditor is not a package on PyPI, so you cannot pip install it. Find out what the correct name for the package is and install that. Then check the documentation for the package you're trying to use to make sure that you're using it correctly.

Oh, What I did was

pip3.6 install --user ckeditor-django

NOT

pip3.6 install --user ckeditor

But I guess I followed as documents say.

document said to do

firstly

pip3.6 install --user ckeditor-django

secondly, Add ckeditor to my INSTALLED_APPS setting.

In local environment, those works fine but I have trouble deploying them.

What am I missing now? Thanks a lot.

Your tracebacks indicate that you're using a virtualenv, but you're doing --user installs. Install the package into the virtualenv that you're using for your webapp.

I guess I did that either, as I can see in my virtualenv,

(virtualenv) 12:51 ~/GLIF_Website_Project (master)$ pip install django-ckeditor

Looking in links: /usr/share/pip-wheels

Requirement already satisfied: django-ckeditor in /home/ehdals56/.local/lib/python2.7/site-packages (5.6.1)

Requirement already satisfied: django-js-asset in /usr/local/lib/python2.7/dist-packages (from django-ckeditor) (1.1.0)

But I still have the same issue as above.

Could you give me more feedbacks for this issue?

Your traceback is referring to python3.6, but your virtualenv output is showing python 2.7. Did you copy that virtualenv from a different machine? It looks like you may have committed it into git and checked it out. That does not work. virtualenvs cannot be copied from one machine to another. I would suggest deleting the virtualenv and re-building it for the correct version of Python and then re-installing the packages you need into it.

Thank you for your support. That was my mistake!

I figured those out and fixed the problem. Thanks.

OK -- glad you worked it out!