I keep packages organized on my laptop using environment modules (http://modules.sourceforge.net/).
Hence if I need a particular version of python, I can do
module load python39 etc.
Now if I first load all the required modules in a terminal, and then call emacs from the command line, emacs takes all environment variables appropriately and works great. But when I launch it from start menu, it complains that it cannot find python.
How can I make emacs load the required environment modules?
So when I open any python file in Emacs, I get following error
Output from Backend There was some unexpected output from the Elpy backend. This is usually not a problem and should usually not be reported as a bug with Elpy. You can safely hide this buffer and ignore it. You can also see the output below in case there is an actual problem. Output /opt/python39/install/bin/python3: error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory
the reason being that the path to libpython is defined in my python module.
I am using Ubuntu 20.04, Modules 5.0.1, Emacs 28.1