Skip to content

Don't use activate from inside conda environments #5516

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

Merged
merged 2 commits into from
May 6, 2019

Conversation

xhochy
Copy link

@xhochy xhochy commented Apr 29, 2019

In contrast to virtualenv-created environments, conda environments are not activated from the inside. In constrast, the environment activation is done from the outside via the conda executable that created the environment.

Fixes #4402

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Has a news entry file (remember to thank yourself!)
  • Appropriate comments and documentation strings in the code
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated
  • Test plan is updated as appropriate
  • package-lock.json has been regenerated by running npm install (if dependencies have changed)
  • The wiki is updated with any design decisions/details.

@xhochy
Copy link
Author

xhochy commented Apr 29, 2019

To test this, one simply can create a conda environment where the conda package itself is installed. As I'm new to contributing to VSCode extensions, I would need some guidance how I write a test for this.

@xhochy xhochy force-pushed the conda-activate-as-default branch from f66cbe6 to bea3456 Compare April 29, 2019 21:34
In contrast to virtualenv-created environments, conda environments are not activated from the inside. In constrast, the environment activation is done from the outside via the conda executable that created the environment.

Fixes microsoft#4402
@xhochy xhochy force-pushed the conda-activate-as-default branch from bea3456 to 9fdbafa Compare April 30, 2019 14:25
@xhochy
Copy link
Author

xhochy commented May 3, 2019

@rchiodo This should be the most non-invasive version to load the environment correctly and fix #4402

@rchiodo
Copy link

rchiodo commented May 3, 2019

Yeah this seems right to me too. You look in the base environment first.


In reply to: 489090205 [](ancestors = 489090205)

@rchiodo
Copy link

rchiodo commented May 3, 2019

The unit tests we already have should be verifying the interpreter path for the existing cases.

Other than that, we'd like to test it on Mac/Linux/Windows with conda and non conda environments.


In reply to: 487750270 [](ancestors = 487750270)

@rchiodo
Copy link

rchiodo commented May 3, 2019

I can try on windows.


In reply to: 489131081 [](ancestors = 489131081,487750270)

@rchiodo
Copy link

rchiodo commented May 3, 2019

Works good on windows.


In reply to: 489131165 [](ancestors = 489131165,489131081,487750270)

Copy link

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@rchiodo rchiodo merged commit 927f254 into microsoft:master May 6, 2019
@aldanor
Copy link

aldanor commented May 18, 2019

Could a patch version be released with this please? It's a pretty big change if it makes conda environments usable again.

Edit: no, it still doesn't work :( (#5539)

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conda activation is failing
3 participants