Hi, I’ve been working on this bug for over 5 hours and I’m not sure how to solve it. I have a Python script which I use to setup an Anaconda environment and one of the libraries in that environment which needs to be setup, has to be compiled.
In the Terminal, there is no problem. g++11 is needed to compile so I simply run conda install -y gxx_linux-64=11.2.0
and then the compilation script python compile_library.py
. The compile completes successfully and everything is setup.
With subprocess.run
however, the install completes, but the subsequent compilation script says it is unable to compile because it can’t find g++11.
Here is my call to subprocess.run
:
subprocess.run("conda install -y gxx_linux-64=11.2.0; python compile_library.py", shell=True)