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 Issues #5344

Closed
6 of 24 tasks
DonJayamanne opened this issue Apr 17, 2019 · 6 comments
Closed
6 of 24 tasks

Conda Issues #5344

DonJayamanne opened this issue Apr 17, 2019 · 6 comments
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug meta Issue that is tracking an overall project needs PR Ready to be worked on

Comments

@DonJayamanne
Copy link

DonJayamanne commented Apr 17, 2019

Use conda info

Use conda activate

Use conda run

Verifying conda work is done

Basically we are no longer doing any shenanigans behind conda's back to support it and we are using the provided tooling as expected.

  • Use some conda command to get the list of environments
  • Only use conda activate to activate environments (i.e. don't use source)
  • conda run
    • For executing tools (e.g. formatters, linters, and test runners)
    • For executing user files (e.g. the green play button)
    • For running the debugger
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Apr 17, 2019
@DonJayamanne DonJayamanne self-assigned this Apr 17, 2019
@DonJayamanne DonJayamanne added the meta Issue that is tracking an overall project label Apr 17, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Apr 17, 2019
@DonJayamanne DonJayamanne added triage-needed Needs assignment to the proper sub-team area-terminal bug Issue identified by VS Code Team member as probable bug labels Apr 17, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Apr 17, 2019
@microsoft microsoft locked and limited conversation to collaborators Apr 17, 2019
@DonJayamanne
Copy link
Author

DonJayamanne commented Apr 17, 2019

Suggestions/Notes:

  • A/B test the changes
  • Upstream VS Code fix (Support using a "clean" environment for the terminal vscode#70248)
    • Required
  • No support for conda version < 4.6
    Leave as is for now. Current approach is a best approach.
  • Minimum version of Conda Supported is 4.6
    • Suggest YES
  • Should we expect users to have their shells pre-configured for Conda
    • I.e. ensure conda is in their path, etc...
    • Currently we attempt to get around this by running some conda scripts prior to activation of an environment.
    • Suggest YES for Non-Windows
  • Activation on Windows
    • Activate base environment (this is required to ensure we first setup conda)
    • Then activate the required environment
  • Enable activating conda environments by path
    • Its possible to create conda environments in a specific folder, in this case we need to activate it using the path not the name.
    • Suggest YES (enhancement)

Conda notes on activation:

  • conda create
    Create a new conda environment from a list of specified packages. To use the created environment, use 'source activate envname' look in that directory first. This command requires either the -n NAME or -p PREFIX option.

  • conda activate $ENVNAME
    Instructions can be found here (applies to >= 4.6)

  • activation & paths
    Conda commands used to switch or move between installed environments. The conda activate command prepends the path of your current environment to the PATH environment variable so that you do not need to type it each time. deactivate removes it. Even when an environment is deactivated, you can still execute programs in that environment by specifying their paths directly, as in ~/anaconda/envs/envname/bin/program_name. When an environment is activated, you can execute the program in that environment with just program_name.

  • Conda will never work in VSC

    • See here for details
    • Ensure ~/.bash_profile is clean
    • Install ananconda
    • Activation scripts will be added into ~/.bash_profile
      • However this is conditional
    • Hacky solution - Set path for anaconda when ever a terminal is opened.
    • Currently the path is set conditionally, we could probably prepend the path always. (I.e. rather than getting conda to add the path conditionally, we can do it ALWAYS)

@DonJayamanne
Copy link
Author

DonJayamanne commented Apr 29, 2019

TODO

** Conda Requirements**

@karthiknadig
Copy link
Member

Note: There are some limitations on conda info --json if the extension is using the same command to find envs then it might be broken.
#5344

@DonJayamanne
Copy link
Author

@karthiknadig what are the limitations/issues? Please could you provide more information.

@DonJayamanne DonJayamanne removed this from the 2019 - July Sprint 15 milestone Aug 14, 2019
@luabud luabud added the important Issue identified as high-priority label Oct 8, 2019
@brettcannon brettcannon added this to the April 2022 milestone Mar 21, 2022
@karrtikr karrtikr modified the milestones: April 2022, May 2022 Apr 26, 2022
@karthiknadig karthiknadig modified the milestones: May 2022, June 2022 May 31, 2022
@karthiknadig karthiknadig modified the milestones: June 2022, July 2022 Jun 28, 2022
@karrtikr karrtikr modified the milestones: July 2022, August 2022 Jul 26, 2022
@karrtikr karrtikr added the needs PR Ready to be worked on label Aug 9, 2022
@karrtikr karrtikr modified the milestones: March 2023, April 2023 Mar 20, 2023
@karrtikr karrtikr modified the milestones: April 2023, May 2023 Apr 24, 2023
@karrtikr
Copy link

Closing as stale.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2023
@karrtikr karrtikr removed this from the May 2023 milestone May 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug meta Issue that is tracking an overall project needs PR Ready to be worked on
Projects
None yet
Development

No branches or pull requests

7 participants