forgottenprogramme
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Implementing a `conda doctor` command In this article I discuss the much requested `conda doctor` command, what is expected of it, what is feasible at the moment, and how we could implement it. ## What is expected of `conda doctor`? The `conda doctor` command was first suggested/requested around 9 years ago. See [this](https://github.com/conda/conda/issues/474) GitHub issue. It was first suggested that `conda doctor` display detailed information about environment variables, compilers, OS information etc. But such information was already covered by `conda info --all`. Hence after further discussions and feedback the expectation from `conda doctor` were boiled down to "**diagnose environment integrity/health**". ## A list of requested information about environment health: 1. SAT satisfiability of an environment 2. Are the packages satisifed (according to the solver). IIRC, this happens anytime there are package changes in an environment. 3. Are all the files present in the environment? This would verify that all files that are claimed to be in the environment, are actually present. Mapping os.path.exists on the files list in the conda-meta json files accomplishes this. Are files that are supposed to be hardlinked/symlinked actually hardlinks/symlinks? 4. sha256 and size of every path in the environment (or alternately if path is missing) 5. the existence of non-tracked files in an environment 6. Is the environment listed on environments.txt ? 7. Check file permissions. 8. overlapping paths in conda-meta for an environment 9. if pip has replaced entire packages and conda-meta is out-of-date ## Detailed analysis of the requests above: ### 1. SAT satisfiability of an environment :negative_squared_cross_mark: In [this](https://anaconda.slack.com/archives/C030CB9UQQN/p1667924619775219) slack discussion it is agreed that we would for now want to ignore this request. ### 2. Are the packages satisifed (according to the solver). :heavy_check_mark: This happens anytime there are package changes in an environment. "Satisfied" refers to the solver saying that the matchspec has been resolved and all resulting dependencies and versions are already installed in the current environment. ### 3. Are all the files present in the environment? :heavy_check_mark: (implemented) This would verify that all files that are claimed to be in the environment, are actually present. Mapping os.path.exists on the files list in the conda-meta json files accomplishes this. Are files that are supposed to be hardlinked/symlinked actually hardlinks/symlinks? #### Summarize We check whether all the claimed files (packages) in the environment are actually present in it or not. We then check whether all these packages are satisfied or not. ### 4. sha256 and size of every path in the environment (or alternately if path is missing) :heavy_check_mark: (partially implemented) The purpose of this is to know if any package has been altered (indicated by changed sha256 key). Instead of displaying the sha256 of all packages, we could display the list of altered packages. ### 5. the existence of untracked files in an environment :heavy_check_mark: Untracked files are those that exist in the environment but weren't installed by conda.“Untracked” basically means “not managed by conda”, so if, e.g., you `conda export` the environment, that file won’t be included. (edited) ### 6. Is the environment listed on environments.txt ? (implemented) :woman-shrugging: Every new environment gets listed on the `environments.txt` file in the .conda directory. But if the files gets deleted, the contents cannot be retrieved. ### 7. Check file permission File permissions would mean ensuring that one can read and write everything contained within a conda environment. Perhaps the `conda doctor --info` could be the one **I do not understand point #8.** ### 9. If pip has replaced entire packages and conda-meta is out-of-date This would be the case if I for example installed a package originally with conda but then later installed the same thing with pip. Usually, pip would just ignore this, but if you downgrade a package, this could totally happen. For example, if I create an environment with the package "requests" and then used pip to install an older version of "requests", the information in the "conda-meta" folder would be incorrect because it would only be aware of the version that conda installed. `conda doctor` could display the list of packages with version ## Based on above analysis, a list of stats `conda doctor` could display 1. Missing Packages (#3) 2. Unsatisfied Packages (#2) 3. Altered packages (#4) 4. Untracked files (#5) ### Prototype running `conda doctor` could display the following: ![](https://i.imgur.com/5cIpu19.png) ### More detailed statistics about the environement health could be displayed using `conda doctor -v` More detailed stats could include: * Names of the missing packages, * name of the unsatisfied packages and their missing dependencies, sha256 keys of the altered packages, * names of the untracked files. * From point #7, `conda doctor -v` could also display the permission various files have. * From point #9, `conda doctor -v` could display the list of packages with installed versions different from those mentioned in the conda-meta. --- ## Can this command be a plugin? Why or why not? Based on my discussion with Bianca we were able to conclude that `conda doctor` can indeed be implemented as a plugin. It will help show how conda can use plugins internally as well, and not only for some user built functionality. ## Why will this command be useful? One place for users to see all inconsistencies in their environment. Output of this command will help them others debug their environment. This could especially be helpful for us, the conda developers, but also for internal IT support staff that may be wishing to fix issues themselves. In our issue template we request users to share with us the result of `conda info`, `conda config` , maybe after implementing `conda doctor`, we could ask them to share the result of `conda doctor`.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully