As PROJ recent major update introduces importants change in the API, I need in my script to check what is the PROJ version compiled with the current GDAL installation of the user. I know I can get the GDAL version with osgeo.gdal.VersionInfo() but it does not tell me what is the PROJ version.

Any suggestions?


This way:

>>> from osgeo import osr
>>> osr.GetPROJVersionMajor()
>>> osr.GetPROJVersionMinor()
| improve this answer | |
  • That method doesn't exist for osgeo.version_info : sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0) – Spacedman Nov 13 at 10:36
  • @Spacedman I have osgeo.version_info sys.version_info(major=3, minor=7, micro=0, releaselevel='final', serial=0) and method works. My current Proj version seems to be 6.3. Newest Proj is 7.2 but I do not know if there has been changes between 6 and 7. – user30184 Nov 13 at 11:08

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.