<div dir="ltr"><div>Hi all,</div><div dir="ltr"><br></div><div dir="ltr">I removed all files from the build and started over, building using the same procedure that I used with the source from a couple of weeks ago without problem and now I get the following error:<br><br>(gdal) [master] $ pytest -v autotest/utilities/test_gdal_viewshed.py<br>ImportError while loading conftest '/Users/abell/gdal.2/build/autotest/conftest.py'.<br>autotest/conftest.py:9: in <module><br>    from osgeo import gdal, ogr, osr<br>swig/python/osgeo/__init__.py:35: in <module><br>    _gdal = swig_import_helper()<br>swig/python/osgeo/__init__.py:32: in swig_import_helper<br>    return importlib.import_module('_gdal')<br>E   ModuleNotFoundError: No module named '_gdal'<br><br><br>PYTHONPATH is set as follows:<br><br>(gdal) [master] $ env | grep PYTHONPATH<br>PYTHONPATH=/Users/abell/gdal.2/build/swig/python:<br><br><br></div><div dir="ltr">The osgeo directory referenced from PYTHONPATH contains the following:<br><br>(gdal) [master] $ ls -l /Users/abell/gdal.2/build/swig/python/osgeo<br>total 6136<br>-rw-r--r--  1 abell  staff    4758 Apr 30 08:00 __init__.py<br>drwxr-xr-x  3 abell  staff      96 Apr 30 08:01 __pycache__<br>-rwxr-xr-x  1 abell  staff  970248 Apr 30 08:00 _<a href="http://gdal.cpython-312-darwin.so">gdal.cpython-312-darwin.so</a><br>-rwxr-xr-x  1 abell  staff  136376 Apr 30 08:00 _<a href="http://gdal_array.cpython-312-darwin.so">gdal_array.cpython-312-darwin.so</a><br>-rwxr-xr-x  1 abell  staff   54352 Apr 30 08:00 _<a href="http://gdalconst.cpython-312-darwin.so">gdalconst.cpython-312-darwin.so</a><br>-rwxr-xr-x  1 abell  staff  104072 Apr 30 08:00 _<a href="http://gnm.cpython-312-darwin.so">gnm.cpython-312-darwin.so</a><br>-rwxr-xr-x  1 abell  staff  717640 Apr 30 08:00 _<a href="http://ogr.cpython-312-darwin.so">ogr.cpython-312-darwin.so</a><br>-rwxr-xr-x  1 abell  staff  416120 Apr 30 08:00 _<a href="http://osr.cpython-312-darwin.so">osr.cpython-312-darwin.so</a><br>-rw-r--r--  1 abell  staff  336675 Apr 30 08:00 gdal.py<br>-rw-r--r--  1 abell  staff   33746 Apr 30 08:00 gdal_array.py<br>-rw-r--r--  1 abell  staff   12517 Apr 30 08:00 gdalconst.py<br>-rw-r--r--  1 abell  staff     214 Apr 30 08:00 gdalnumeric.py<br>-rw-r--r--  1 abell  staff   14413 Apr 30 08:00 gnm.py<br>-rw-r--r--  1 abell  staff  221167 Apr 30 08:00 ogr.py<br>-rw-r--r--  1 abell  staff   84266 Apr 30 08:00 osr.py<br><br>I would have thought the file _<a href="http://gdal.cpython-312-darwin.so">gdal.cpython-312-darwin.so</a> would have been found and loaded, but my expertise in this is limited. I tried tracing with PYTHONVERBOSE set, but the only references to _gdal I saw were in the same error message quoted above.</div><br>Thanks for any help,<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 29, 2024 at 5:37 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
    
  
  <div>
    <p>Andrew,</p>
    <p>Perhaps you're running updated GDAL Python bindings against a
      libgdal that hasn't been rebuilt recently? OSRIsDerivedProjected()
      has been added recently both in libgdal and the bindings</p>
  </div>

</blockquote></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div></div>