Git Product home page Git Product logo

Comments (6)

joouha avatar joouha commented on May 25, 2024 2

OK, so that explains why those kernels show up in Jupyter Notebook and not in euporie.

I think you said you installed euporie with pipx - so euporie will be in a different Python environment to Jupyter Notebook and your custom kernels.

Jupyter and euporie both search for kernelspecs in several folders, including the share folder for the current Python environment (this is where kernelspecs for custom kernels usually get installed). Since Jupyter Notebook is running from the same environment in which the kernels are installed, it is able to find them.

Since Euporie is running in a different Python environment, it does not know anything about the environment with the custom kernels in, so does not find the kernelspecs.

By running python -m ipykernel install --user, you install a copy of the kernelspec to your user profile, where euporie can find it.

from euporie.

joouha avatar joouha commented on May 25, 2024

Hello,

The kernel_connection_file parameter in euporie's config allows you to connect to an existing running kernel instance by providing a kernel connection file. A kernel connection file contains the IP, ports, and authentication key needed to connect to an existing running instance of the kernel. Typically this file gets created when a kernel is launched.

The file C:\Users\asharaf\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\share\jupyter\kernels\python3\kernel.json is a kernelspec file. A kernel spec file tells Jupyter how to launch a particular kernel. So, as you have found, setting kernel_connection_file to a kernelspec file will not work.

Normally you can switch the kernel from within euporie-notebook by selecting Kernel > Change kernel from the menus - see here: https://euporie.readthedocs.io/en/latest/apps/notebook.html#changing-the-kernel

If your kernel does not show up on the list of available kernels in euporie, you need to register your kernel.

conda activate arcgispro-py3-clone
python -m ipykernel install --user --name python3-arcgispro --display-name "Python 3 (ArcGIS Pro)"

This should copy the python3 kernelspec folder to %APPDATA%\jupyter\kernels, adding the correct python interpreter path. It should now show in the list of available kernels in euporie.

You can find more information about kernelspecs in the jupyter_client documentation here:
https://jupyter-client.readthedocs.io/en/stable/kernels.html#kernelspecs

from euporie.

azinsharaf avatar azinsharaf commented on May 25, 2024

thanks @joouha . It works now. I removed the invalid config.json file and ran python -m ipykernel install --user --name python3-arcgispro --display-name "Python 3 (ArcGIS Pro)" as you mentioned. Now euporie notebook can recognize my python interpreter. Sweet!
The only question now is when I run jupyter notebook I see three kernels (the middle one is the one I just created). So why euporie couldn't use the existing one i already have. (maybe they are in a different location?)

image

image

from euporie.

joouha avatar joouha commented on May 25, 2024

Are you running Jupyter Notebook from within your arcgispro-py3-clone conda environment?

from euporie.

azinsharaf avatar azinsharaf commented on May 25, 2024

yes

image

from euporie.

azinsharaf avatar azinsharaf commented on May 25, 2024

Thanks for the great explanation.

from euporie.

Related Issues (20)

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.