vericast / kernda Goto Github PK
View Code? Open in Web Editor NEWAdd conda activation to an IPython kernel spec
License: BSD 3-Clause "New" or "Revised" License
Add conda activation to an IPython kernel spec
License: BSD 3-Clause "New" or "Revised" License
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
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
.
@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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.