#30933: Update installation instructions for GeoDjango dependencies on Windows.
-------------------------------------+-------------------------------------
     Reporter:  Adam Starrh          |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Documentation        |                  Version:  2.2
     Severity:  Normal               |               Resolution:
     Keywords:  geodjango,           |             Triage Stage:  Accepted
  installation, windows              |
    Has patch:  0                    |      Needs documentation:  1
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Adam Starrh):

 Hello,

 When following the instructions in the documentation, only the latest
 version of the gdal dll is placed in the /bin/ directory via the OSGeo4Win
 installer. There are no older versions available.

 I don't have immediate access to the traces but the general result was
 that the utility that searches for the .dll was unable to find it, even
 when it was present. I should note that I identified two separate issues
 while setting this up.

 The first was a repeat of an issue I encountered earlier:

 https://code.djangoproject.com/ticket/28237

 In this case, `gdal204.dll` was missing from Django's `libgdal.py` file
 and I had to enter it manually. However, this time, it continued to return
 the same GDALexception as before,
 which led me to the second issue. I tried setting the GDAL_LIBRARY_PATH
 manually in the settings and when attempting to run the migrations, it
 reported: "this is not a valid win32 application". This tipped me off to
 the issue and I rolled python and OSGeo4Win back to the 32-bit versions,
 and that resolved it. This was the 4th or so time over the years that I
 have chosen 64-bit python in the installation process and had to go back
 and convert to the 32-bit. This is why I am suggesting an amendment to the
 instructions at this step in the process, as it creates hours of headaches
 each time.

 Aside from these issues with GDAL, the instructions as-written work pretty
 well for getting casual coders like myself up and running quickly. The
 techs all work together nicely and having the process simple and
 straightforward is part of what I believe makes Django so accessible. The
 OSGeo4Win is certainly a convenient package that enables users to skip a
 lot of steps installing individual dependencies that they would have to
 endure otherwise. If a full revision is necessary, I'd hope that this is
 kept in mind.

 64-bit Python isn't necessary for most users and creates a lot of these
 kinds of problems, so much so that Windows users seem to typically avoid
 using it. If someone has a good reason to opt for 64-bit Python, then
 hopefully they are prepared to handle these kinds of issues independently.
 The same goes for anyone with a preference toward another geospatial db
 library. Having more options included in the instructions makes the
 process more confusing for new users and more complicated to support.

 The only other real trip-up is the outdated link. At one time psycopg2
 wouldn't install via pip, and this was the preferred workaround. That is
 no longer an issue as the package will successfully install via pip, so
 long as the user has Visual Studio C++ installed (which should probably be
 mentioned).

 I am away from the system in question until early next week. I can post
 the full tracebacks at that time and can also try the alternate gdal
 version suggested in the PR if it would still be helpful.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30933#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0f271c4d604d67fa93626af5523f979f%40djangoproject.com.

Reply via email to