Thanks for the response. That was my first impulse, but I was having trouble importing the packages. I use:
from osgeo import gdal
from osgeo import osr
import numpy as np
import os, sys
In Julia, when I try:
julia> osg = pyimport("osgeo")
ERROR: PyError (PyImport_ImportModule
The Python package osgeo could not be found by pyimport. Usually this means
that you did not install osgeo in the Python version being used by PyCall.
PyCall is currently configured to use the Python version at:
and you should use whatever mechanism you usually use (apt-get, pip, conda,
etcetera) to install the Python package containing the osgeo module.
One alternative is to re-configure PyCall to use a different Python
version on your system: set ENV["PYTHON"] to the path/name of the python
executable you want to use, run Pkg.build("PyCall"), and re-launch Julia.
Another alternative is to configure PyCall to use a Julia-specific Python
distribution via the Conda.jl package (which installs a private Anaconda
Python distribution), which has the advantage that packages can be installed
and kept up-to-date via Julia. As explained in the PyCall documentation,
set ENV["PYTHON"]="", run Pkg.build("PyCall"), and re-launch Julia. Then,
To install the osgeo module, you can use `pyimport_conda("osgeo", PKG)`,
where PKG is the Anaconda package the contains the module osgeo,
or alternatively you can use the Conda package directly (via
`using Conda` followed by `Conda.add` etcetera).
) <class 'ImportError'>
ImportError("/home/efurtak/julia-1.4.2/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib64/libgdal.so.20)")
File "/usr/lib64/python3.7/site-packages/osgeo/__init__.py", line 21, in <module>
_gdal = swig_import_helper()
File "/usr/lib64/python3.7/site-packages/osgeo/__init__.py", line 17, in swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
File "/usr/lib64/python3.7/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib64/python3.7/imp.py", line 342, in load_dynamic
That is the right python installation, and when I use python3 from the terminal there are no issues importing osgeo (I am using fedora, maybe that is the issue). Also, numpy imports with pycall fine for some reason.