I am trying to use the recently developed grass-session package inside Spyder in Linux Mint with GRASS 7.4.3 installed with a aim to do some geoprocessing without starting GRASS explicitly.
I installed grass-session by
pip install grass-session under LinuxMint Cinnamon. My Spyder is under Miniconda3 but grass-session is not available in conda repos.
Here is my script that I am trying to run inside Spyder v3.2.6
mygisdb = '/tmp/grassdata' mylocation = 'world' mymapset = 'user' import os, sys, subprocess # ensuring the GRASSBIN is in the path and starting the GRASS GIS session os.system('grass --config path') os.system("export GRASSBIN=grass74") from grass_session import Session
But when I run the last line trying to import grass-session, it gives me
ImportError: No module named grass_session
Running Spyder from GRASS Shell gives me access to basic modules like grass.script and so on, but as I mentioned, I want to do it without starting GRASS each time. Any thoughts?