|
1 |
| -InstallationAndUsage |
| 1 | +Installation And Usage |
2 | 2 | --------------------
|
3 | 3 |
|
4 |
| -You will first need to install dependencies. |
| 4 | +Installation from source |
| 5 | +======================== |
| 6 | + |
| 7 | +To ensure that the installation works, it is preferable to install `xeus-cpp` in a |
| 8 | +fresh environment. It is also needed to use a miniforge or miniconda installation |
| 9 | +because with the full Anaconda installation you may have a conflict with the `zeromq` |
| 10 | +library which is already installed in the anaconda distribution. First clone the |
| 11 | +repository, and move into that directory |
5 | 12 |
|
6 | 13 | .. code-block:: bash
|
7 | 14 |
|
8 |
| - mamba install cmake cxx-compiler xeus-zmq nlohmann_json cppzmq xtl jupyterlab |
9 |
| - clangdev=16 cpp-argparse pugixml -c conda-forge |
| 15 | + git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git |
| 16 | + cd ./xeus-cpp |
| 17 | +
|
| 18 | +The safest usage of xeus-cpp from source is to build and install it within a |
| 19 | +clean environment named `xeus-cpp`. You can create and activate |
| 20 | +this environment with mamba by executing the following |
10 | 21 |
|
| 22 | +.. code-block:: bash |
11 | 23 |
|
12 |
| -**Note:** Use a mamba environment with python version >= 3.11 for fetching clang-versions. |
| 24 | + mamba create -n "xeus-cpp" |
| 25 | + source activate "xeus-cpp" |
13 | 26 |
|
14 |
| -The safest usage is to create an environment named `xeus-cpp`. |
| 27 | +We will now install the dependencies needed to compile xeux-cpp from source within |
| 28 | +this environment by executing the following |
15 | 29 |
|
16 | 30 | .. code-block:: bash
|
17 | 31 |
|
18 |
| - mamba create -n xeus-cpp |
19 |
| - source activate xeus-cpp |
| 32 | + mamba install notebook cmake cxx-compiler xeus-zmq nlohmann_json=3.11.2 cppzmq |
| 33 | + xtl jupyterlab CppInterOp cpp-argparse<3.1 pugixml doctest -c conda-forge |
20 | 34 |
|
21 |
| -Installing from conda-forge: |
22 |
| -Then you can install in this environment `xeus-cpp` and its dependencies. |
| 35 | +Now you can compile the kernel from the source by executing (replace `$CONDA_PREFIX` |
| 36 | +with a custom installation prefix if need be) |
23 | 37 |
|
24 | 38 | .. code-block:: bash
|
25 | 39 |
|
26 |
| - mamba install xeus-cpp notebook -c conda-forge |
27 |
| -
|
28 | 40 | mkdir build && cd build
|
29 |
| - cmake .. -D CMAKE_PREFIX_PATH=$CONDA_PREFIX |
30 |
| - -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib |
31 |
| - make && make install |
| 41 | + cmake .. -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX |
| 42 | + -D CMAKE_INSTALL_LIBDIR=lib |
| 43 | + make && make install |
| 44 | +
|
| 45 | +Installing from conda-forge |
| 46 | +=========================== |
| 47 | + |
| 48 | +If you have conda installed then you can install xeus-cpp using the follwing command |
| 49 | + |
| 50 | +.. code-block:: bash |
| 51 | +
|
| 52 | + conda install conda-forge::xeus-cpp |
| 53 | +
|
| 54 | +Xeus-cpp is available for Linux, MacOS and Windows. |
0 commit comments