title: self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found
body: <p>I am integrating <code>geodjango</code> in my real estate website, and I am tired of this error. </p>
  
  <pre><code>Watching for file changes with StatReloader
  Exception in thread django-main-thread:
  Traceback (most recent call last):
    File "c:\users\pytuts\appdata\local\programs\python\python37\lib\threading.py", line 917, in _bootstrap_inner
      self.run()
    File "c:\users\pytuts\appdata\local\programs\python\python37\lib\threading.py", line 865, in run
      self._target(*self._args, **self._kwargs)
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
      fn(*args, **kwargs)
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run
      autoreload.raise_last_exception()
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\utils\autoreload.py", line 76, in raise_last_exception
      raise _exception[1]
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\core\management\__init__.py", line 357, in execute
      autoreload.check_errors(django.setup)()
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper
      fn(*args, **kwargs)
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\__init__.py", line 24, in setup
      apps.populate(settings.INSTALLED_APPS)
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\apps\registry.py", line 114, in populate
      app_config.import_models()
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\apps\config.py", line 211, in import_models
      self.models_module = import_module(models_module_name)
    File "c:\users\pytuts\appdata\local\programs\python\python37\lib\importlib\__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 1006, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 983, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 967, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 677, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 728, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\auth\models.py", line 2, in &lt;module&gt;
      from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\auth\base_user.py", line 47, in &lt;module&gt;
      class AbstractBaseUser(models.Model):
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\db\models\base.py", line 121, in __new__
      new_class.add_to_class('_meta', Options(meta, app_label))
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\db\models\base.py", line 325, in add_to_class
      value.contribute_to_class(cls, name)
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\db\models\options.py", line 208, in contribute_to_class
      self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\db\__init__.py", line 28, in __getattr__
      return getattr(connections[DEFAULT_DB_ALIAS], item)
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\db\utils.py", line 207, in __getitem__
      backend = load_backend(db['ENGINE'])
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\db\utils.py", line 111, in load_backend
      return import_module('%s.base' % backend_name)
    File "c:\users\pytuts\appdata\local\programs\python\python37\lib\importlib\__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\db\backends\postgis\base.py", line 6, in &lt;module&gt;
      from .features import DatabaseFeatures
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\db\backends\postgis\features.py", line 1, in &lt;module&gt;
      from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\db\backends\base\features.py", line 3, in &lt;module&gt;
      from django.contrib.gis.db.models import aggregates
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\db\models\__init__.py", line 3, in &lt;module&gt;
      import django.contrib.gis.db.models.functions  # NOQA
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\db\models\functions.py", line 3, in &lt;module&gt;
      from django.contrib.gis.db.models.fields import BaseSpatialField, GeometryField
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\db\models\fields.py", line 3, in &lt;module&gt;
      from django.contrib.gis import forms, gdal
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\forms\__init__.py", line 3, in &lt;module&gt;
      from .fields import (  # NOQA
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\forms\fields.py", line 2, in &lt;module&gt;
      from django.contrib.gis.gdal import GDALException
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\gdal\__init__.py", line 28, in &lt;module&gt;
      from django.contrib.gis.gdal.datasource import DataSource
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\gdal\datasource.py", line 39, in &lt;module&gt;
      from django.contrib.gis.gdal.driver import Driver
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\gdal\driver.py", line 5, in &lt;module&gt;
      from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as rcapi
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\gdal\prototypes\ds.py", line 9, in &lt;module&gt;
      from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
    File "C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\django\contrib\gis\gdal\libgdal.py", line 46, in &lt;module&gt;
      lgdal = CDLL(lib_path)
    File "c:\users\pytuts\appdata\local\programs\python\python37\lib\ctypes\__init__.py", line 356, in __init__
      self._handle = _dlopen(self._name, mode)
  OSError: [WinError 126] The specified module could not be found
  </code></pre>
  
  <p>I also installed QGIS, gdal, PROJ4 and GEOS. I searched other similar questions too and they recommended installing <code>openslide-python</code> but I encounter another error while installing <code>openslide-python</code>: </p>
  
  <pre><code>Collecting openslide-python
    Using cached openslide-python-1.1.1.tar.gz (312 kB)
      ERROR: Command errored out with exit status 1:
       command: 'C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\pytuts\\AppData\\Local\\Temp\\pip-install-_cr1cg72\\openslide-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\pytuts\\AppData\\Local\\Temp\\pip-install-_cr1cg72\\openslide-python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\pytuts\AppData\Local\Temp\pip-pip-egg-info-ol4dazi2'
           cwd: C:\Users\pytuts\AppData\Local\Temp\pip-install-_cr1cg72\openslide-python\
      Complete output (5 lines):
      Traceback (most recent call last):
        File "&lt;string&gt;", line 1, in &lt;module&gt;
        File "C:\Users\pytuts\AppData\Local\Temp\pip-install-_cr1cg72\openslide-python\setup.py", line 2, in &lt;module&gt;
          from setuptools import setup, Extension, Feature
      ImportError: cannot import name 'Feature' from 'setuptools' (C:\Users\pytuts\.virtualenvs\geodjango-webpage-6RyR6Y5t\lib\site-packages\setuptools\__init__.py)
      ----------------------------------------
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  </code></pre>
  
  <p>again this error <code>ImportError: cannot import name 'Feature' from 'setuptools'</code> and then I installed <code>setuptools</code> using <code>pip3 install setuptools</code>. </p>
  
  <p>Even these didn't solve my problem? Please help me. Thank You</p>