With this code can send your instructions or shells to the terminal. (This worked directly on Ubuntu).
import subprocess
command = """conda activate your_env"""
process = subprocess.run(
command,
shell=True,
stdout=subprocess.PIPE,
sdterr=subprocess.PIPE,
shell=True
)