Channels: ModuleNotFoundError: No module named 'channles'

Created on 12 Nov 2018  路  7Comments  路  Source: django/channels

While done installtion of 'channles'...But it is doesn't work in my projects.. however i was install channles still show 'ModuleNotFoundError: No module named 'channles''

Most helpful comment

I figured it out finally. I'm still a beginner. I was using a cloned venv folder. I needed to delete that folder, create a new venv and reinstall the dependencies on that venv. I made a requirements.txt to make it easier next time. I also added venv to my .gitignore, cleared the index, and made sure to only add necessary files to the repository.

All 7 comments

The package is spelled channels, not channles - make sure you installed the right one (and don't install django-channels, which is not the right package either).

Sorry .. Its my spelled mistake in issue..but in projects it is channles ..But won't work,,

well I had the same issue before, I solved by changing it is place like it follows:

INSTALLED_APPS = [
    "chat",
    "channels",
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    "my_app.apps.MyAppConfig",
]

I'm having a similar issue. It worked as I was going through the tutorial, but once I reopened the project later it said "channels module not found" . when I tried to run the Django server.

Check you activated your venv.

I figured it out finally. I'm still a beginner. I was using a cloned venv folder. I needed to delete that folder, create a new venv and reinstall the dependencies on that venv. I made a requirements.txt to make it easier next time. I also added venv to my .gitignore, cleared the index, and made sure to only add necessary files to the repository.

The solution that I found with docker was to rebuild. I always forget to rebuild after editing the settings.py.

docker-compose build web

I did this with a docker-compose file, and replace web with your container. :)

Was this page helpful?
0 / 5 - 0 ratings