1
$\begingroup$

when i run following command
source ~/anaconda3/bin/activate root
it is work fine. I don't want to run this command every time. give me any solution.

$\endgroup$
1
$\begingroup$

You can write script (.sh) for that.

STARTPATH=$(pwd)
cd ~/anaconda3/bin
case $1 in
    -j|--jupyter)
        shift
        source activate
        jupyter-lab
        ;;
    -n|--navigator)
        shift
        source activate
        anaconda-navigator
        ;;
esac
source deactivate
cd $STARTPATH

Then you can run the script by ./ or you can put the script in /usr/local/bin and make it executable chmod +x *yourfile*.sh.

After that you should be able to type in your console: *yourfile* -n and this will launch anaconda navigator.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.