GithubHelp home page GithubHelp logo

Comments (10)

necaris avatar necaris commented on August 20, 2024 8

@dan-delion thanks for the clarification! Since you can conda activate base, however, I think it might warrant adding a special case for this so we're consistent.

from conda.el.

arthurcgusmao avatar arthurcgusmao commented on August 20, 2024 1

@necaris yes, this is still present. However, easier to be fixed now. Gonna tackle it as soon as I have the time. Thank you for this nice package!

My idea is to modify either conda-env-candidates-from-dir or conda-env-candidates to list another option to the user including "base", where the path for base is conda-anaconda-home. That should solve it I believe, though still gotta think of the best way to do this.

Probably it'll also be necessary to modify with conda-env-name-to-dir --- we need to both list the "base" env to the user and then be able to translate it to the correct, abovementioned path.

from conda.el.

necaris avatar necaris commented on August 20, 2024 1

So somehow, part of conda is getting the path structure right, while another part believes it's wrong. Is this a Linux/Windows thing?

I suspect it is -- I'm going to create a new issue, so that we don't confuse the details of this one, and tag you in it. Would you be able to paste the full error message (and anything that appears in your *Messages* buffer) there, to help debug?

I'm afraid I don't have easy access to a Windows environment so I'm not able to test this easily on Windows -- I can confirm it seems to work for me fine on Linux 😢

from conda.el.

soedirgo avatar soedirgo commented on August 20, 2024

This is because the envs directory doesn't contain the base environment. Instead, it lies in the conda installation path.

You should be able to do (conda-env-activate "..") to achieve what you want.

from conda.el.

arthurcgusmao avatar arthurcgusmao commented on August 20, 2024

Hi, I found a bug related to activating the base environment with the abovementioned workaround: the package is not able to deactivate the environment afterward.

This commit fixes it. I would appreciate if you could take a look into it and see if my changes make sense. If they do, I can continue to work towards making the package list base as an option. Thanks!

from conda.el.

necaris avatar necaris commented on August 20, 2024

Please confirm this is still present now that #66 is merged -- would love to be able to close it! Thanks @arthurcgusmao for the PR!

from conda.el.

notuntoward avatar notuntoward commented on August 20, 2024

I just updated to the latest conda package on melpa/elpa and now I am seeing this emacs error message:

c:/Users/scott/anaconda3/envs

The line in my .emacs causing it is:

(conda-env-activate "stdso")

But this line has worked for at least the last six months.

And also:

>dir C:\Users\scott\anaconda3\envs
Volume in drive C has no label.
Volume Serial Number is FE63-9685

Directory of C:\Users\scott\anaconda3\envs

07/16/2020 08:55 PM

.
07/16/2020 08:55 PM ..
05/14/2020 05:17 PM 0 .conda_envs_dir_test
08/13/2020 05:28 PM keras
05/14/2020 05:21 PM stdso
1 File(s) 0 bytes
4 Dir(s) 204,586,835,968 bytes free

from conda.el.

necaris avatar necaris commented on August 20, 2024

@notuntoward can you try updating that line to the full path to your conda env, e.g. C:\\Users\\scott\\anaconda3\\envs\\stdso, and confirm if it still works? If so, then perhaps we need to update the fix from #66 .

from conda.el.

notuntoward avatar notuntoward commented on August 20, 2024

As in:

(conda-env-activate "c:/Users/scott/anaconda3/envs/stdso")

?
Doing that, the error message is still:

Error (use-package): conda/:config: Invalid conda environment path
specified: c:/Users/scott/anaconda3/envs/stdso/

(I see that the cut and paste in my last message omitted a good chunk of the full error text)

But if I go back to the way it was,

(conda-env-activate "stdso")

I can manually run M-x conda-env-activate and get a prompt from emacs, asking me to pick either stdso or keras. But then get an error message when I pick either one.

So somehow, part of conda is getting the path structure right, while another part believes it's wrong. Is this a Linux/Windows thing?

from conda.el.

arthurcgusmao avatar arthurcgusmao commented on August 20, 2024

Hi, @notuntoward sorry for the issue, it likely is something with the differences Windows and Linux have of handling filenames. Unfortunately, I only tested it myself on Linux.

Probably it is something to do with the modifications in the function conda-env-is-valid-path for Windows, done in #66 as @necaris mentioned.

A possible workaround is (conda-env-activate-path "c:/Users/scott/anaconda3/envs/stdso"), can you please try it?

However, we should fix it the proper way even if the above works.

from conda.el.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.