-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. #13002
Comments
Hello, |
For #!/bin/bash --login
... |
What am I missing?.. this is what I did...
|
Is there any trick to make it work ? To me it seems that miniconda is dead on arrival at this point! To an application developer this is the normal flow...
So the qn is if 6c is not working then how would someone use miniconda? |
Any help , conda team ? |
Based on what I see you're doing, everything is working correctly. The Experiment with this modified script to more clearly see which environment you have activated: #!/bin/bash --login
conda $@
echo "+++++++++++++++++++++++++++++"
echo "active environment: $CONDA_PREFIX"
echo "+++++++++++++++++++++++++++++" With this modified script we see the following: (base) $ ./sc2-modified.sh activate /root/demo20
+++++++++++++++++++++++++++++
activate environment: /root/demo20
+++++++++++++++++++++++++++++
(base) $ Notice that within your script you have activated the correct environment and once the script completes you are returned to your previous environment. This is expected. Your #!/bin/bash --login
# create application environment
conda env create --prefix /root/myapp --file path/to/myapp.yml --yes --quiet
# activate application environment
conda activate /root/myapp
# optionally inspect conda, the active environment will be listed
conda info
# run application
path/to/myapp1.py |
Hi there, thank you for your contribution! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment. Thanks! |
Hi there, I got the same issue recently and solve this problem by running codes below: |
this works, thanks! |
Thank you very much. |
thanks! |
What happened?
conda activate <my environment>
from a shell script is giving following error:A brief background and what was done:
Installed miniconda successfully by downloading this file "https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh".
I see that
conda init
adds lines in.bashrc
and I seebase
is activated after I restart the shell.Scripts:
sc2.sh
demo.py
Conda Details
conda info
conda config
conda list
Additional Context
I searched all over the internet and found most useful steps here:
#7980
https://donny-son.github.io/posts/cronjob-with-conda/
But looks like nothing is working.
The text was updated successfully, but these errors were encountered: