Git Product home page Git Product logo

xeus-python's Introduction

xeus-python

Azure Pipelines Appveyor Documentation Status Binder Join the Gitter Chat

xeus-python is a Jupyter kernel for Python based on the native implementation of the Jupyter protocol xeus.

Installation

xeus-python has been packaged for the mamba (or conda) package manager.

To ensure that the installation works, it is preferable to install xeus-python in a fresh environment. It is also needed to use a miniforge or miniconda installation because with the full anaconda you may have a conflict with the zeromq library which is already installed in the anaconda distribution.

The safest usage is to create an environment named xeus-python

mamba create -n xeus-python
source activate xeus-python

Installing from conda-forge

Then you can install in this environment xeus-python and its dependencies

mamba install xeus-python notebook -c conda-forge

Installing from PyPI

Depending on the platform, PyPI wheels may be available for xeus-python.

pip install xeus-python notebook

If you encounter the following error message

Collecting xeus-python
  Cache entry deserialization failed, entry ignored
  Could not find a version that satisfies the requirement xeus-python (from versions: )
No matching distribution found for xeus-python

you probably need to upgrade pip: pip install --upgrade pip before attempting to install xeus-python again.

The wheels uploaded on PyPI are experimental. In general we strongly recommend using a package manager instead. We maintain the conda-forge package, and nothing prevents you from creating a package your favorite Linux distribution or FreeBSD.

The ongoing effort to package xeus-python for pip takes place in the xeus-python-wheel repository.

Installing from source

Or you can install it from the sources, you will first need to install dependencies

mamba install cmake xeus nlohmann_json cppzmq xtl pybind11 pybind11_json ipython debugpy jupyterlab -c conda-forge

Then you can compile the sources (replace $CONDA_PREFIX with a custom installation prefix if need be)

mkdir build && cd build
cmake .. -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib -D PYTHON_EXECUTABLE=`which python`
make && make install

Trying it online

To try out xeus-python interactively in your web browser, just click on the binder link:

Binder

Usage

Launch the Jupyter notebook with jupyter notebook or Jupyter lab with jupyter lab and launch a new Python notebook by selecting the xpython kernel.

Code execution and variable display:

Basic code execution

Output streams:

Streams

Input streams:

Input

Error handling:

Erro handling

Inspect:

Inspect

Code completion:

Completion

Rich display:

Rich display

And of course widgets:

Widgets Widgets binary

Documentation

To get started with using xeus-python, check out the full documentation

http://xeus-python.readthedocs.io

What are the advantages of using xeus-python over ipykernel (IPython kernel)?

Check-out this blog post for the answer: https://blog.jupyter.org/a-new-python-kernel-for-jupyter-fcdf211e30a8. Long story short:

  • xeus-python is a lot lighter than ipykernel, which makes it a lot easier to implement new features on top of it.
  • xeus-python already works with the Jupyter Lab debugger: https://github.com/jupyterlab/debugger
  • xeus-based kernels are more versatile in that one can overload e.g. the concurrency model. This is something that Kitware’s SlicerJupyter project takes advantage of to integrate with the Qt event loop of their Qt-based desktop application.

Dependencies

xeus-python depends on

xeus-python xeus xtl cppzmq nlohmann_json pybind11 pybind11_json jedi pygments ptvsd debugpy IPython
master >=1.0.0,<0.26 >=0.7.0,<0.8 ~4.4.1 >=3.6.1,<4.0 >=2.6.0,<3.0 >=0.2.8,<0.3 >=2.3.1,<3.0.0 >=1.1.0 >=7.21,<8
0.12.3 >=1.0.0,<0.26 >=0.7.0,<0.8 ~4.4.1 >=3.6.1,<4.0 >=2.6.0,<3.0 >=0.2.8,<0.3 >=2.3.1,<3.0.0 >=1.1.0 >=7.21,<8
0.12.2 >=1.0.0,<0.26 >=0.7.0,<0.8 ~4.4.1 >=3.6.1,<4.0 >=2.6.0,<3.0 >=0.2.8,<0.3 >=2.3.1,<3.0.0 >=1.1.0 >=7.21,<8
0.12.1 >=1.0.0,<0.26 >=0.7.0,<0.8 ~4.4.1 >=3.6.1,<4.0 >=2.6.0,<3.0 >=0.2.8,<0.3 >=2.3.1,<3.0.0 >=1.1.0 >=7.21,<8
0.12.0 >=1.0.0,<0.26 >=0.7.0,<0.8 ~4.4.1 >=3.6.1,<4.0 >=2.6.0,<3.0 >=0.2.8,<0.3 >=2.3.1,<3.0.0 >=1.1.0 >=7.21,<8
0.11.3 >=1.0.0,<0.26 >=0.7.0,<0.8 ~4.4.1 >=3.6.1,<4.0 >=2.6.0,<3.0 >=0.2.8,<0.3 >=2.3.1,<3.0.0 >=1.1.0 >=7.20,<8
0.11.2 >=1.0.0,<0.26 >=0.7.0,<0.8 ~4.4.1 >=3.6.1,<4.0 >=2.6.0,<3.0 >=0.2.8,<0.3 >=2.3.1,<3.0.0 >=1.1.0 >=7.20,<8
0.11.1 >=1.0.0,<0.26 >=0.7.0,<0.8 ~4.4.1 >=3.6.1,<4.0 >=2.6.0,<3.0 >=0.2.8,<0.3 >=2.3.1,<3.0.0 >=1.1.0 >=7.20,<8
0.11.0 >=1.0.0,<0.26 >=0.7.0,<0.8 ~4.4.1 >=3.6.1,<4.0 >=2.6.0,<3.0 >=0.2.8,<0.3 >=2.3.1,<3.0.0 >=1.1.0 >=7.20,<8

Contributing

See CONTRIBUTING.md to know how to contribute and set up a development environment.

License

We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.

This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.

xeus-python's People

Contributors

agoose77 avatar akhmerov avatar btel avatar chronitis avatar cnydw avatar hahnjo avatar johanmabille avatar jtpio avatar lassoan avatar martinrenou avatar sylvaincorlay avatar telamonian avatar vasavanthiru avatar zonca avatar

Watchers

 avatar

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.