I am trying to find version of pandas:
def check_library_version():
print("Checking library version")
subprocess.run(f'bash -c "conda activate {ENV_NAME};"', shell=True)
import pandas
pandas.__version__
Desired output: 1.1.3
Output:
Checking library version
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
To clarify, I don't seek to update the environment of the currently running script; I just want to briefly activate that environment and find out which Pandas version is installed there.