oscarpilote / Ortho4XP

A scenery generator for the X-Plane flight simulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I can't get Homebrew to respond

OldSubSailor opened this issue · comments

All of these thing are somewhat interrelated. Until I upgraded to Big Sur, Ortho4XP and GDAL was working fine. I know next to nothing about python, but I eventually did find these lines of code in Ortho4XP:

import gdal
has_gdal=True
except:
has_gdal=False

which leads me to think that GDAL that we get from Homebrew is supposed to be a python import module and was working as expected.
Then came the upgrade to Big Sur and python 3.9 and things went south. Ortho4XP only uses GDAL when we create elevation tiles from USGS NED data. So when I try that I ultimately end up with this:

elif not has_gdal:
UI.lvprint(1," WARNING: unsupported raster (install Gdal):", file_name, "-> replaced with zero altitude.")
nxdem=nydem=base_if_error

error message telling me to install GDAL which I did install via home brew, and shows up in a brew listing:
% brew info GDAL
gdal: stable 3.2.0 (bottled), HEAD

I also tried calling the module directly from python:
Python 3.9.0 (v3.9.0:9cf6752276, Oct 5 2020, 11:29:23)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import gdal
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'gdal'
I updated homebrew and GDAL but still GDAL fails.
I would appreciate your help.

Update, I also changed to Python 3.8 but no luck. However, I did see that a fresh homebrew install of GDAL, adds some python 3.9 to things. But calling python3 still brings up 3.8 at this time.

Did you try a "pip3 install gdal"?