0

I plan on building a web application using Geodjango. After installing PostgreSQL, PostGIS, OsGeo4W and psycopg. I changed my settings.py db to that of the PostGIS. Each time I run the commmad "python manage.py runserver" I get the error "api-ms-win-crt-heap-|1-1-0.dll is missing."

i have kb299261 installed and microsoft visual C++ 2015 installed.

see screenshot below.enter image description here

  • So do you have that file somewhere or not? – lynxlynxlynx Jan 13 '18 at 21:06
  • I don't have it... I searched online for possible solution but I couldn't solve it. I went ahead to download the dll file but it popped another dll file missing . I ended up downloading 7 dll files before I stopped downloading them. Anyone experienced this error before? I'm using window8.1 64bits, python3. 4, django1. 9 and Postgresql9. 5 – Ibrahim Folarin Jan 13 '18 at 22:48
1

These steps will fix windows installations:

  • Start by upgrading to latest python (3.6), Django (2.x), postgres (10.x) and postgis (2.4.x).
  • Run python to check if your python is 32 or 64 bit (It will be displayed on the screen).
  • Install corresponding OSGeo4W (32 or 64 bit) into C:\OSGeo4W or C:\OSGeo4W64:
    • Note: Select Express Web-GIS Install and click next.
    • In the ‘Select Packages’ list, ensure that GDAL is selected; MapServer and Apache are also enabled by default, may be unchecked safely.
  • Make sure the following is included in your Django's settings.py:

    import os
    if os.name == 'nt':
        import platform
        OSGEO4W = r"C:\OSGeo4W"
        if '64' in platform.architecture()[0]:
            OSGEO4W += "64"
        assert os.path.isdir(OSGEO4W), "Directory does not exist: " + OSGEO4W
        os.environ['OSGEO4W_ROOT'] = OSGEO4W
        os.environ['GDAL_DATA'] = OSGEO4W + r"\share\gdal"
        os.environ['PROJ_LIB'] = OSGEO4W + r"\share\proj"
        os.environ['PATH'] = OSGEO4W + r"\bin;" + os.environ['PATH']
    
  • Run python manage.py check to verify geodjango is working correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.