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

Conda Activation fails on Windows with Conda 4.4.0 and later #2753

Closed
DonJayamanne opened this issue Oct 2, 2018 · 6 comments
Closed

Conda Activation fails on Windows with Conda 4.4.0 and later #2753

DonJayamanne opened this issue Oct 2, 2018 · 6 comments
Assignees
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority

Comments

@DonJayamanne
Copy link

The problem is conda is not in current path.
Reported by @jmew

Discussions found here #1882

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug area-terminal needs decision important Issue identified as high-priority needs proposal Need to make some design decisions labels Oct 2, 2018
@DonJayamanne
Copy link
Author

We'll need to decide on how we solve this?

  • Do we get Conda to provide a proper solution
  • Do we try to find alternatives/work around until then.
    I believe we must, else conda activations is impossible with VSC extension untill the next version of Conda that has the fix (if it does).
    I.e. users of Conda + Windows will not have a solution for a while.

@Microsoft/pvsc-team

@ericsnowcurrently
Copy link
Member

Also see #668 and conda/conda#626.

@brettcannon
Copy link
Member

brettcannon commented Oct 2, 2018

Unfortunately we have conflicting instructions at this point. https://conda.io/docs/user-guide/tasks/manage-environments.html#activating-an-environment says to use an Anaconda Prompt (which is Command Prompt) with no PowerShell support. But if you look at https://github.com/conda/conda/blob/master/CHANGELOG.md#recommended-change-to-enable-conda-in-your-shell it says it should be conda activate but that doesn't work on Windows for either Command Prompt or PowerShell.

I think the only option we have is to only use conda activate on UNIX and stick with the activate command on Windows -- using an absolute path to the command -- while asking Anaconda to fix the situation on their end. Basically we can only do so much because we can't will into existence proper Windows support from conda.

@msarahan
Copy link

msarahan commented Oct 3, 2018

I agree with these instructions right now:

I think the only option we have is to only use conda activate on UNIX and stick with the activate command on Windows -- using an absolute path to the command -- while asking Anaconda to fix the situation on their end. Basically we can only do so much because we can't will into existence proper Windows support from conda.

I am terribly sorry for the mess on Windows. A lot of effort has gone into Conda 4.6.0 to straighten out the setup of the conda shell command. We are working to include Powershell support with that release. conda/conda#7794

Please ping me and @kalefranz if you have trouble with the split approach that @brettcannon recommended. We will be sure to test VS Code's activation stuff, and we'll post if we have questions.

@brettcannon
Copy link
Member

@msarahan thanks for the double-check on the approach! And we already have the split logic working ATM (we think 😉 ), it just wasn't using an absolute path for activate to solve the Windows case which was causing us issues due to conda not being on the path by default.

@brettcannon
Copy link
Member

@msarahan actually, we have discovered we can't support conda activate when it isn't on the PATH appropriately as we can't specify the absolute path to conda without breaking the shell magic the command uses, so we will have to remove that support for now.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority
Projects
None yet
Development

No branches or pull requests

5 participants