I was using some python-based package called pyscenic.
I installed it in a conda environment called scenic
.
whereis pyscenic
results in /home/user/.conda/envs/scenic/bin/pyscenic
When I use conda activate scenic
then pysenic
, it works properly.
I built a jupyter notebook and added scenic
as one of the kernel, then I opened a notebook under this kernel, so supposedly I'm now in working under this conda env. However, when I do !pysenic
, it tells me /bin/bash: pyscenic: command not found
, tried adding !export PATH=/home/joyzheng/.conda/envs/scenic/bin/pyscenic
prior to the command doesn't work either. I guess the problem lies with location of the files and directory but I'm not sure how it worked exactly.
The question was marked duplicated to another question asking about linking conda env to jupyter notebook... I've already linked it, but failed to use packages installed in that conda env.
The problem was resolved via specifying the path to that program. Seems like even if I'm already opening the notebook under corresponding kernel, when using !command it still goes back to find command from the base environment. I have to specify !/home/user/.conda/envs/scenic/bin/pysenic
rather than !pysenic
to make it work.