Skip to content
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

[QUESTION] How to use conda? #69

Closed
NightMachinery opened this issue Mar 28, 2018 · 10 comments
Closed

[QUESTION] How to use conda? #69

NightMachinery opened this issue Mar 28, 2018 · 10 comments

Comments

@NightMachinery
Copy link

Conda uses a .sh script to start itself up, and running that script via source-shell does no good.

 $ conda activate

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current user with

    $ echo ". /Users/evar/anaconda/etc/profile.d/conda.sh" >> ~/.bash_profile

or, for all users, enable conda with

    $ sudo ln -s /Users/evar/anaconda/etc/profile.d/conda.sh /etc/profile.d/conda.sh

The options above will permanently enable the 'conda' command, but they do NOT
put conda's base (root) environment on PATH.  To do so, run

    $ conda activate

in your terminal, or to put the base environment on PATH permanently, run

    $ echo "conda activate" >> ~/.bash_profile

Previous to conda 4.4, the recommended way to activate conda was to modify PATH in
your ~/.bash_profile file.  You should manually remove the line that looks like

    export PATH="/Users/evar/anaconda/bin:$PATH"

^^^ The above line should NO LONGER be in your ~/.bash_profile file! ^^^
@dundalek
Copy link
Owner

I am not familiar with conda, but from the docs you posted it seems that the result of the conda activate is the thing that needs to be sourced. So this might do the trick:

(source-shell (sh-str conda activate))

@NightMachinery
Copy link
Author

NightMachinery commented Mar 29, 2018 via email

@dundalek
Copy link
Owner

I see, I overlooked some details. Maybe try:

(source-shell "bash" "/Users/evar/anaconda/etc/profile.d/conda.sh")
(source-shell "conda activate")

@dundalek
Copy link
Owner

@NightMachinary Were you able to run conda with those last commands?

@NightMachinery
Copy link
Author

NightMachinery commented Apr 14, 2018 via email

@dundalek
Copy link
Owner

Could you provide the error output?

@NightMachinery
Copy link
Author

@dundalek Oh, I had included an image of the error but it was lost during the mail to github conversion it seems. Here you go:
image

@dundalek
Copy link
Owner

@NightMachinary I just tried conda in a VM, and I think I got it now:

(source-shell ". ~/anaconda/etc/profile.d/conda.sh; conda activate")

Thanks for your patience.

@NightMachinery
Copy link
Author

NightMachinery commented Apr 16, 2018 via email

@dundalek
Copy link
Owner

Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants