Samantha Wittke
    • 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
    • Publish Note

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

      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.
      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
    • Engagement control
    • 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 Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control 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
  • Publish Note

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

    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.
    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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: Conda for (data) scientists - Intro tags: Conda, datascience, software carpentry slideOptions: spotlight: enabled: false theme: "moon" --- ## Conda for (data) scientists <!-- Put the link to this slide here so people can follow --> slides: https://hackmd.io/@samumantha/conda-slides --- | Time (CET) | Episode | | -------- | -------- | |9-10 | Getting started, Working with Environments | |**10-10.15**|**Break** | |10.15-11.15|Working with Environments , Using packages and channels | |**11.15-11.30**|**Break** | |11.30-12|Using packages and channels , Sharing environments | --- ## Getting started with conda episode: https://carpentries-incubator.github.io/introduction-to-conda-for-data-scientists/01-getting-started-with-conda/index.html --- ## Packages ```import something``` Note: * Python can do a lot * not alone * external packages * import package * **Module**: a collection of functions and variables, as in a script * **Package**: a collection of modules with an init.py file (can be empty), as in a directory with scripts * **Library**: a collection of packages with realted functionality Library/Package are often used interchangeably. :lightning: Module on HPC different --- ## Dependencies "[Something] relying on [something else] to work."" Note: * not alone * not reinvent the wheel * building on shoulders of giants * updated versions may create issues --- From [pandas documentation](https://pandas.pydata.org/pandas-docs/stable/getting_started/install.html): ![](https://i.imgur.com/jBKPj1d.png) --- From [scikit-learn documentation](https://scikit-learn.org/0.19/developers/advanced_installation.html) ![](https://i.imgur.com/sJk7NM1.png) --- "I found this package that would solve all my problems, but it needs [some package] 1.3 while all other packages I need rely on [same package] 2.5" :sob: --- "I found this package that would solve all my problems, but it needs [Python] 2.7 while all other packages I need rely on [Python] 3.6" :sob: --- ## Environments Note: * beginning all straight forward, we install on computer * multi version necessary * multi computer * or environments --- ### Environment management system * Multiple versions * Portability * Rights Note: An environment management system solves a number of problems commonly encountered by (data) scientists. * multi version * make old code work * 'it works on my machine' * same packages -> same results * Project specific setup * resolve dependecy issues by being able to use multi versions * projects are self-contained and reproducible by capturing all package dependencies in a single requirements file * Allow you to install packages on a host on which you do not have admin privileges. * Conda is not the only way, check out also other environment management systems! --- ### Package management system * Dependencies * Updates Note: * simplifies the process of installing software by… * identifying and installing compatible versions of software + dependencies. * handling the process of updating software * Conda is not the only way, check out also other package management systems, such as pip --- ### Why use package and environment management systems? * Same package, different version * Dependency hell (updates) * Reproducibility Note: * Installing software is hard. * Installing scientific software is often even more challenging. no software devs drawbacks of system wide installation: * It can be difficult to figure out what software is required for any particular research project. * It is often impossible to install different versions of the same software package at the same time. * Updating software required for one project can often “break” the software installed for another project. -> installing software system-wide creates complex dependencies between your research projects that shouldn’t really exist! wouldnt it be great do install per research project? --- ## Discussion :bulb: What are some of the potential benefits from installing software separately for each project? What are some of the potential costs? Note: hackmd --- ## Conda Note: Conda is an open source package and environment management system that runs on Windows, Mac OS and Linux. * Conda can q install, run, and update packages and their dependencies. * Conda can create, save, load, and switch between project specific software environments on your local computer. * Although created for Python, Conda can package and distribute software for any language such as R, Ruby, Lua, Scala, Java, JavaScript, C, C++, FORTRAN. * Conda as a package manager helps you find and install packages. * With just a few commands, you can set up a totally separate environment to run that different version of Python, while continuing to run your usual version of Python in your normal environment, also environment manager --- ![](https://carpentries-incubator.github.io/introduction-to-conda-for-data-scientists/fig/miniconda_vs_anaconda.png) Note: Conda is a tool for managing environments and installing packages. Miniconda combines Conda with Python and a small number of core packages; Anaconda includes Miniconda as well as a large number of the most widely used Python packages. Continuum analytics. --- ## Why conda? * Avoid building from source * takes care of dependencies * OS independent * combined package *and* environment management system Note: * Conda solves both package and environment management problems * Conda provides prebuilt packages, no compilers needed, * TensorFlow is another tool where to install it from source is near impossible, but Conda makes this a single step. * Conda is cross platform * allows sharing environments * pip (other package management system) inside conda * Anaconda : commonly used data science libraries and tools, such as TensorFlow built using optimised, hardware specific libraries (such as NVIDIA’s CUDA), which provides a speedup without having to change any of your code. --- ## Keypoints * Conda: * platform agnostic * open source * package and environment management system * not only for Python Note: * Conda is a platform agnostic, open source package and environment management system. * Using a package and environment management tool facilitates portability and reproducibility of (data) science workflows. * Conda solves both the package and environment management problems and targets multiple programming languages. Other open source tools solve either one or the other, or target only a particular programming language. * Anaconda is not only for Python

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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