Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making a kernel in JupyterLab #81

Closed
pibion opened this issue Jul 29, 2022 · 2 comments
Closed

making a kernel in JupyterLab #81

pibion opened this issue Jul 29, 2022 · 2 comments

Comments

@pibion
Copy link
Member

pibion commented Jul 29, 2022

I'm trying to turn a python environment into a jupyter kernel (see #80).

Following and sometimes modifying suggestions at https://janakiev.com/blog/jupyter-virtual-envs/, I tried the following commands:

python3 -m venv AMY
source AMY/bin/activate
# Then I wanted to see if I could install something
python3 -m pip install requests
pip install ipykernel
python -m ipykernel --user install --name=AMY

The install commands seemed to work - I could see ipykernel and requests stuff in AMY/lib/python3.8/site-packages/. The output from the above commands was

(AMY) bash-4.2$ python -m ipykernel --user install --name=AMY
[IPKernelApp] WARNING | Unrecognized alias: 'name', it will have no effect.
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
    --existing kernel-395.json

But when I opened a new notebook, there was no additional kernel option.

@zonca do you know how to create a kernel from a python environment?

@zonca
Copy link
Collaborator

zonca commented Jul 29, 2022

Maybe --user needs to be after install?

Please double check in the official docs: https://ipython.readthedocs.io/en/stable/install/kernel_install.html

@zonca
Copy link
Collaborator

zonca commented Aug 16, 2022

Create env

python3 -m venv AMY
source AMY/bin/activate
# Then I wanted to see if I could install something
python3 -m pip install requests
pip install ipykernel

Install kernel

python -m ipykernel install --user --name=AMY

Force reload JupyterLab in the browser

image

It works fine, it was just the wrong position of --user, for example:

python -m ipykernel --user install

launches ipykernel instead of installing it

@zonca zonca closed this as completed Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants