I wrote a Python script which uses a package named
paraview. I installed this package to my environment. I want that whenever the code is run, the environment must be changed and then the code is run.
I added the following command at the beginning of the code but it didn't work.
import os os.system("conda activate <env. name>")
I get following error:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. To initialize your shell, run $ conda init <SHELL_NAME>
I tried the solution given at How to activate conda environments while still being able to change the environment with eval --setenvironment but couldn't get any result.
Is there any way to do this?