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

Comments

Projects
None yet
5 participants
@DonJayamanne

DonJayamanne commented Oct 2, 2018

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

Discussions found here #1882

@DonJayamanne

This comment has been minimized.

Show comment
Hide comment
@DonJayamanne

DonJayamanne Oct 2, 2018

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

DonJayamanne commented Oct 2, 2018

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

This comment has been minimized.

Show comment
Hide comment
@ericsnowcurrently
Member

ericsnowcurrently commented Oct 2, 2018

Also see #668 and conda/conda#626.

@brettcannon

This comment has been minimized.

Show comment
Hide comment
@brettcannon

brettcannon Oct 2, 2018

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@msarahan

msarahan 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.

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

This comment has been minimized.

Show comment
Hide comment
@brettcannon

brettcannon Oct 3, 2018

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.

Member

brettcannon commented Oct 3, 2018

@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

This comment has been minimized.

Show comment
Hide comment
@brettcannon

brettcannon Oct 3, 2018

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.

Member

brettcannon commented Oct 3, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment