Django no module named "compressor"

14,759

Solution 1

So pretty much I had to install django-compressor using my local pip, so for some reason it's not utilizing my virtual environments compressor

Solution 2

You need to reinstall django_compressor in your Venv

 pip install django_compressor
Share:
14,759
john
Author by

john

Updated on June 07, 2022

Comments

  • john
    john almost 2 years

    I'm trying to create a super user using cmd but every time I run the command I get:

    C:\Users\PCDOM\Desktop\Power\pm_app>python manage.py syncdb
    Traceback (most recent call last):
      File "manage.py", line 17, in <module>
        execute_from_command_line(sys.argv)
      File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
    338, in execute_from_command_line
        utility.execute()
      File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
    312, in execute
        django.setup()
      File "C:\Python27\lib\site-packages\django\__init__.py", line 18, in setup
        apps.populate(settings.INSTALLED_APPS)
      File "C:\Python27\lib\site-packages\django\apps\registry.py", line 85, in popu
    late
        app_config = AppConfig.create(entry)
      File "C:\Python27\lib\site-packages\django\apps\config.py", line 86, in create
    
        module = import_module(entry)
      File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
        __import__(name)
    ImportError: No module named compressor
    

    Even though I have it installed in my virtual environment and in my settings.py:

    enter image description here

    INSTALLED_APPS = (
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.sites',
        'django.contrib.messages',
        'django.contrib.staticfiles',
        #'bootstrap3',
        'promo',
        'ums',
        'compressor',
        #'sqlserver_ado',
        # Uncomment the next line to enable the admin:
        'django.contrib.admin',
        # Uncomment the next line to enable admin documentation:
        'django.contrib.admindocs',
    )
    
    STATICFILES_FINDERS = (
        'django.contrib.staticfiles.finders.FileSystemFinder',
        'django.contrib.staticfiles.finders.AppDirectoriesFinder',
        #'django.contrib.staticfiles.finders.DefaultStorageFinder',
        'compressor.finders.CompressorFinder',
    )
    

    Any reason django is spasing out on me?

  • Homunculus Reticulli
    Homunculus Reticulli almost 7 years
    The missing package is django-compressor NOT django_compressor