Skip to content

Conda Issues #5344

Description

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

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Apr 17, 2019
  2. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Apr 17, 2019
  3. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Apr 17, 2019
  4. locked and limited conversation to collaborators on Apr 17, 2019
  5. DonJayamanne commented on Apr 17, 2019

    @DonJayamanne
    Author

    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)
  6. DonJayamanne commented on Apr 29, 2019

    @DonJayamanne
    Author

    TODO

    ** Conda Requirements**

  7. 53 remaining items

  8. karrtikr commented on May 25, 2023

    @karrtikr

    Closing as stale.

  9. removed this from the May 2023 milestone on May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugmetaIssue that is tracking an overall projectneeds PRReady to be worked on

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions