I use QGIS and therefore also OSGeo4W.
At the moment I am writing a script that use ogr in python. I need a virtual environment for because it is going to be deployed on a server (which also has OSGeo4W). After creating a virtual env (python -m venv venv) then I cannot import ogr as I would do from the OSGeo4W shell
from osgeo import ogr. I am a windows user, so is the server.
I have been reading many post about issues using/installing ogr in python but at the moment I am completely confused, I . I am not a very experienced python user, and setting up the dependencies appear to be the hardest bit yet. This post is similar to what I want to do Use OGR and GDAL in Python outside OSGEO4W shell but the link in the post to binaries include mapserver which I am not interested in. Any advice?