Giter Club home page Giter Club logo

kernda's People

Contributors

ericdill avatar mariusvniekerk avatar parente avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kernda's Issues

TIL kernda is not idempotent

If you run kernda multiple times on the same kernelspec then truly awful things happen to that poor kernelspec...

Start out with a fresh kernel:

$ python -m ipykernel install --user --name python3 --display-name "base [py3.6.5]"
Installed kernelspec python3 in /Users/edill/Library/Jupyter/kernels/python3

$ cat /Users/edill/Library/Jupyter/kernels/python3/kernel.json
{
 "argv": [
  "/Users/edill/miniconda/bin/python",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ],
 "display_name": "base [py3.6.5]",
 "language": "python"
}

So far so good. Run kernda once:

$ kernda /Users/edill/Library/Jupyter/kernels/python3/kernel.json --env-dir /Users/edill/miniconda -o
{
  "argv": [
    "bash",
    "-c",
    "source \"/Users/edill/miniconda/bin/activate\" \"/Users/edill/miniconda\" && exec /Users/edill/miniconda/bin/python -m ipykernel_launcher -f '{connection_file}' "
  ],
  "display_name": "base [py3.6.5]",
  "language": "python"
}
Wrote to /Users/edill/Library/Jupyter/kernels/python3/kernel.json

Run kernda again...

kernda /Users/edill/Library/Jupyter/kernels/python3/kernel.json --env-dir /Users/edill/miniconda -o
{
  "argv": [
    "bash",
    "-c",
    "source \"/Users/edill/miniconda/bin/activate\" \"/Users/edill/miniconda\" && exec bash -c 'source \"/Users/edill/miniconda/bin/activate\" \"/Users/edill/miniconda\" && exec /Users/edill/miniconda/bin/python -m ipykernel_launcher -f '\"'\"'{connection_file}'\"'\"' ' "
  ],
  "display_name": "base [py3.6.5]",
  "language": "python"
}
Wrote to /Users/edill/Library/Jupyter/kernels/python3/kernel.json

Switching to conda activate

As of conda 4.4.0, the preferred activation strategy is to run source <PREFIX>/etc/profile.d/conda.sh followed by conda activate. The former strategy, source activate, still exists, but is being phased out. Would be good to plan similarly for kernda.

Submit conda-forge recipe

@parente I wanted to use this today but there's no conda package yet ๐Ÿ˜ฟ

We probably need another tag for this. Would you suggest 0.0.4 or 0.1.0?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.