Sudha247 / ocaml-joy

MIT License
22 stars 14 forks source link

Jupyter notebook and graphics interop #2

Open Sudha247 opened 1 year ago

Sudha247 commented 1 year ago

joy tutorial uses jupyter notebooks as an interactive medium. I think we should consider using jupyter notebooks at a later point. Jupyter OCaml kernel works quite well in my experience: https://github.com/akabe/ocaml-jupyter. We should find how to use the graphics library with the jupyter kernel. I'd approach this issue with the following steps:

godplayer56 commented 1 year ago

Hi @Sudha247 ! I have setup opam and jupyter on my notebook. And I'm currently setting up the OCaml kernel to go through the examples. What should I do once I explore the examples?

Sudha247 commented 1 year ago

Hi @godplayer56, thanks for your interest in contributing to this library. Could you confirm that you are able to run the examples in graphics on your machine? If it indeed works, please try to run it on the jupyter notebook.

godplayer56 commented 1 year ago

Hi @godplayer56, thanks for your interest in contributing to this library. Could you confirm that you are able to run the examples in graphics on your machine? If it indeed works, please try to run it on the jupyter notebook.

@Sudha247 I'm not able to install OCaml kernel for jupyter. On the step opam install jupyter, I get the following error :

varun@varun-HP-Laptop-15s-dr1xxx ~
 % opam install jupyter
[ERROR] Package conflict!
  * No agreement on the version of ocaml:
    - (invariant) -> ocaml-base-compiler >= 5.1.0 -> ocaml = 5.1.0
    - jupyter -> ocaml < 4.08.0
    You can temporarily relax the switch invariant with `--update-invariant'
  * No agreement on the version of ocaml-base-compiler:
    - (invariant) -> ocaml-base-compiler >= 5.1.0
    - jupyter -> ocaml < 4.08.0 -> ocaml-base-compiler < 3.07+1
  * Missing dependency:
    - jupyter -> ocaml < 4.08.0 -> ocaml-variants -> ocaml-beta
    unmet availability conditions: 'enable-ocaml-beta-repository'

No solution found, exiting
godplayer56 commented 1 year ago

And these are my ocaml specs :

varun@varun-HP-Laptop-15s-dr1xxx ~
 % opam switch
#   switch   compiler                   description
->  5.1.0    ocaml-base-compiler.5.1.0  5.1.0
    default  ocaml.5.1.0                default
varun@varun-HP-Laptop-15s-dr1xxx ~
 % opam list
# Packages matching: installed
# Name                # Installed # Synopsis
base-bigarray         base
base-domains          base
base-nnp              base        Naked pointers prohibited in the OCaml heap
base-threads          base
base-unix             base
conf-libX11           1           Virtual package relying on an Xlib system inst
conf-pkg-config       3           Check if pkg-config is installed and create an
csexp                 1.5.2       Parsing and printing of S-expressions in Canon
dune                  3.10.0      Fast, portable, and opinionated build system
dune-configurator     3.10.0      Helper library for gathering system configurat
graphics              5.1.2       The OCaml graphics library
ocaml                 5.1.0       The OCaml compiler (virtual package)
ocaml-base-compiler   5.1.0       Official release 5.1.0
ocaml-config          3           OCaml Switch Configuration
ocaml-options-vanilla 1           Ensure that OCaml is compiled with no special 
AryanGodara commented 1 year ago

@godplayer56 one issue that I see here is the version of ocaml-base-compiler doesn't fit into the requirements of jupyter.

You can create a new switch with the correct 4.x.x. version and see if it works. (If you're confused about opam switches, let me know)

Keep us posted with your progress :)

godplayer56 commented 1 year ago

@AryanGodara Thanks for this :sweat_smile: Changing the opam switch worked with installing jupyter. But on the last command, I'm still getting the error "jupyter : command not found"

No matter how many times I install jupyter (via pip or python) and even after manually adding it to the path, it's not being recognized as a command.

Sudha247 commented 1 year ago

@godplayer56 could you mention the version of python and jupyter you're using. This is a remote possibility, have you updated your shell after the installation?

godplayer56 commented 1 year ago

@godplayer56 could you mention the version of python and jupyter you're using. This is a remote possibility, have you updated your shell after the installation?

@Sudha247 I am currently using python3 version Python 3.10.12 and I also have installed pip version pip 23.2.1 and as for jupyter it is not being shown in installed directories but it always says that the repository exists whenever I try to reinstall it :sweat: . Here is what it says-

varun@varun-HP-Laptop-15s-dr1xxx ~/ocaml-joy
 % pip install jupyterlab
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: jupyterlab in /home/varun/.local/lib/python3.10/site-packages (4.0.6)
Requirement already satisfied: async-lru>=1.0.0 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (2.0.4)
Requirement already satisfied: ipykernel in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (6.25.2)
Requirement already satisfied: jinja2>=3.0.3 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (3.1.2)
Requirement already satisfied: jupyter-core in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (5.3.2)
Requirement already satisfied: jupyter-lsp>=2.0.0 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (2.2.0)
Requirement already satisfied: jupyter-server<3,>=2.4.0 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (2.7.3)
Requirement already satisfied: jupyterlab-server<3,>=2.19.0 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (2.25.0)
Requirement already satisfied: notebook-shim>=0.2 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (0.2.3)
Requirement already satisfied: packaging in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (23.2)
Requirement already satisfied: tomli in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (2.0.1)
Requirement already satisfied: tornado>=6.2.0 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (6.3.3)
Requirement already satisfied: traitlets in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab) (5.10.1)
Requirement already satisfied: typing-extensions>=4.0.0 in /home/varun/.local/lib/python3.10/site-packages (from async-lru>=1.0.0->jupyterlab) (4.8.0)
Requirement already satisfied: MarkupSafe>=2.0 in /home/varun/.local/lib/python3.10/site-packages (from jinja2>=3.0.3->jupyterlab) (2.1.3)
Requirement already satisfied: anyio>=3.1.0 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (4.0.0)
Requirement already satisfied: argon2-cffi in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (23.1.0)
Requirement already satisfied: jupyter-client>=7.4.4 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (8.3.1)
Requirement already satisfied: jupyter-events>=0.6.0 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.7.0)
Requirement already satisfied: jupyter-server-terminals in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.4.4)
Requirement already satisfied: nbconvert>=6.4.4 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (7.8.0)
Requirement already satisfied: nbformat>=5.3.0 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (5.9.2)
Requirement already satisfied: overrides in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (7.4.0)
Requirement already satisfied: prometheus-client in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.17.1)
Requirement already satisfied: pyzmq>=24 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (25.1.1)
Requirement already satisfied: send2trash>=1.8.2 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (1.8.2)
Requirement already satisfied: terminado>=0.8.3 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.17.1)
Requirement already satisfied: websocket-client in /home/varun/.local/lib/python3.10/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (1.6.3)
Requirement already satisfied: platformdirs>=2.5 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-core->jupyterlab) (3.11.0)
Requirement already satisfied: babel>=2.10 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab-server<3,>=2.19.0->jupyterlab) (2.12.1)
Requirement already satisfied: json5>=0.9.0 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab-server<3,>=2.19.0->jupyterlab) (0.9.14)
Requirement already satisfied: jsonschema>=4.18.0 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab-server<3,>=2.19.0->jupyterlab) (4.19.1)
Requirement already satisfied: requests>=2.31 in /home/varun/.local/lib/python3.10/site-packages (from jupyterlab-server<3,>=2.19.0->jupyterlab) (2.31.0)
Requirement already satisfied: comm>=0.1.1 in /home/varun/.local/lib/python3.10/site-packages (from ipykernel->jupyterlab) (0.1.4)
Requirement already satisfied: debugpy>=1.6.5 in /home/varun/.local/lib/python3.10/site-packages (from ipykernel->jupyterlab) (1.8.0)
Requirement already satisfied: ipython>=7.23.1 in /home/varun/.local/lib/python3.10/site-packages (from ipykernel->jupyterlab) (8.16.1)
Requirement already satisfied: matplotlib-inline>=0.1 in /home/varun/.local/lib/python3.10/site-packages (from ipykernel->jupyterlab) (0.1.6)
Requirement already satisfied: nest-asyncio in /home/varun/.local/lib/python3.10/site-packages (from ipykernel->jupyterlab) (1.5.8)
Requirement already satisfied: psutil in /home/varun/.local/lib/python3.10/site-packages (from ipykernel->jupyterlab) (5.9.5)
Requirement already satisfied: idna>=2.8 in /usr/lib/python3/dist-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab) (3.3)
Requirement already satisfied: sniffio>=1.1 in /home/varun/.local/lib/python3.10/site-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab) (1.3.0)
Requirement already satisfied: exceptiongroup>=1.0.2 in /home/varun/.local/lib/python3.10/site-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab) (1.1.3)
Requirement already satisfied: backcall in /home/varun/.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (0.2.0)
Requirement already satisfied: decorator in /home/varun/.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (5.1.1)
Requirement already satisfied: jedi>=0.16 in /home/varun/.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (0.19.1)
Requirement already satisfied: pickleshare in /home/varun/.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (0.7.5)
Requirement already satisfied: prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30 in /home/varun/.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (3.0.39)
Requirement already satisfied: pygments>=2.4.0 in /home/varun/.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (2.16.1)
Requirement already satisfied: stack-data in /home/varun/.local/lib/python3.10/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (0.6.3)
Requirement already satisfied: pexpect>4.3 in /usr/lib/python3/dist-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (4.8.0)
Requirement already satisfied: attrs>=22.2.0 in /home/varun/.local/lib/python3.10/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (23.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /home/varun/.local/lib/python3.10/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (2023.7.1)
Requirement already satisfied: referencing>=0.28.4 in /home/varun/.local/lib/python3.10/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (0.30.2)
Requirement already satisfied: rpds-py>=0.7.1 in /home/varun/.local/lib/python3.10/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (0.10.3)
Requirement already satisfied: python-dateutil>=2.8.2 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-client>=7.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (2.8.2)
Requirement already satisfied: python-json-logger>=2.0.4 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->jupyterlab) (2.0.7)
Requirement already satisfied: pyyaml>=5.3 in /usr/lib/python3/dist-packages (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->jupyterlab) (5.4.1)
Requirement already satisfied: rfc3339-validator in /home/varun/.local/lib/python3.10/site-packages (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->jupyterlab) (0.1.4)
Requirement already satisfied: rfc3986-validator>=0.1.1 in /home/varun/.local/lib/python3.10/site-packages (from jupyter-events>=0.6.0->jupyter-server<3,>=2.4.0->jupyterlab) (0.1.1)
Requirement already satisfied: beautifulsoup4 in /home/varun/.local/lib/python3.10/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (4.12.2)
Requirement already satisfied: bleach!=5.0.0 in /home/varun/.local/lib/python3.10/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (6.0.0)
Requirement already satisfied: defusedxml in /home/varun/.local/lib/python3.10/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.7.1)
Requirement already satisfied: jupyterlab-pygments in /home/varun/.local/lib/python3.10/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.2.2)
Requirement already satisfied: mistune<4,>=2.0.3 in /home/varun/.local/lib/python3.10/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (3.0.2)
Requirement already satisfied: nbclient>=0.5.0 in /home/varun/.local/lib/python3.10/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.8.0)
Requirement already satisfied: pandocfilters>=1.4.1 in /home/varun/.local/lib/python3.10/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (1.5.0)
Requirement already satisfied: tinycss2 in /home/varun/.local/lib/python3.10/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (1.2.1)
Requirement already satisfied: fastjsonschema in /home/varun/.local/lib/python3.10/site-packages (from nbformat>=5.3.0->jupyter-server<3,>=2.4.0->jupyterlab) (2.18.1)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/varun/.local/lib/python3.10/site-packages (from requests>=2.31->jupyterlab-server<3,>=2.19.0->jupyterlab) (3.3.0)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests>=2.31->jupyterlab-server<3,>=2.19.0->jupyterlab) (1.26.5)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests>=2.31->jupyterlab-server<3,>=2.19.0->jupyterlab) (2020.6.20)
Requirement already satisfied: ptyprocess in /usr/lib/python3/dist-packages (from terminado>=0.8.3->jupyter-server<3,>=2.4.0->jupyterlab) (0.7.0)
Requirement already satisfied: argon2-cffi-bindings in /home/varun/.local/lib/python3.10/site-packages (from argon2-cffi->jupyter-server<3,>=2.4.0->jupyterlab) (21.2.0)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from bleach!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (1.16.0)
Requirement already satisfied: webencodings in /home/varun/.local/lib/python3.10/site-packages (from bleach!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.5.1)
Requirement already satisfied: parso<0.9.0,>=0.8.3 in /home/varun/.local/lib/python3.10/site-packages (from jedi>=0.16->ipython>=7.23.1->ipykernel->jupyterlab) (0.8.3)
Requirement already satisfied: fqdn in /home/varun/.local/lib/python3.10/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (1.5.1)
Requirement already satisfied: isoduration in /home/varun/.local/lib/python3.10/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (20.11.0)
Requirement already satisfied: jsonpointer>1.13 in /home/varun/.local/lib/python3.10/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (2.4)
Requirement already satisfied: uri-template in /home/varun/.local/lib/python3.10/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (1.3.0)
Requirement already satisfied: webcolors>=1.11 in /home/varun/.local/lib/python3.10/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (1.13)
Requirement already satisfied: wcwidth in /home/varun/.local/lib/python3.10/site-packages (from prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30->ipython>=7.23.1->ipykernel->jupyterlab) (0.2.8)
Requirement already satisfied: cffi>=1.0.1 in /home/varun/.local/lib/python3.10/site-packages (from argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=2.4.0->jupyterlab) (1.16.0)
Requirement already satisfied: soupsieve>1.2 in /home/varun/.local/lib/python3.10/site-packages (from beautifulsoup4->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (2.5)
Requirement already satisfied: executing>=1.2.0 in /home/varun/.local/lib/python3.10/site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyterlab) (2.0.0)
Requirement already satisfied: asttokens>=2.1.0 in /home/varun/.local/lib/python3.10/site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyterlab) (2.4.0)
Requirement already satisfied: pure-eval in /home/varun/.local/lib/python3.10/site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyterlab) (0.2.2)
Requirement already satisfied: pycparser in /home/varun/.local/lib/python3.10/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=2.4.0->jupyterlab) (2.21)
Requirement already satisfied: arrow>=0.15.0 in /home/varun/.local/lib/python3.10/site-packages (from isoduration->jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (1.3.0)
Requirement already satisfied: types-python-dateutil>=2.8.10 in /home/varun/.local/lib/python3.10/site-packages (from arrow>=0.15.0->isoduration->jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (2.8.19.14)

although I am able to access jupyter notebook using the following commands -

varun@varun-HP-Laptop-15s-dr1xxx ~/ocaml-joy
 % python3 -m notebook
[I 2023-10-03 13:10:08.562 ServerApp] Package notebook took 0.0000s to import
[I 2023-10-03 13:10:08.586 ServerApp] Package jupyter_lsp took 0.0230s to import
[W 2023-10-03 13:10:08.587 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-03 13:10:08.642 ServerApp] Package jupyter_server_terminals took 0.0549s to import
[I 2023-10-03 13:10:08.645 ServerApp] Package jupyterlab took 0.0001s to import
[I 2023-10-03 13:10:11.009 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-10-03 13:10:11.009 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-10-03 13:10:11.009 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-10-03 13:10:11.014 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-10-03 13:10:11.019 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-10-03 13:10:11.025 ServerApp] notebook | extension was successfully linked.
[I 2023-10-03 13:10:12.321 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-10-03 13:10:12.364 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-10-03 13:10:12.367 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-10-03 13:10:12.368 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-10-03 13:10:12.379 LabApp] JupyterLab extension loaded from /home/varun/.local/lib/python3.10/site-packages/jupyterlab
[I 2023-10-03 13:10:12.379 LabApp] JupyterLab application directory is /home/varun/.local/share/jupyter/lab
[I 2023-10-03 13:10:12.380 LabApp] Extension Manager is 'pypi'.
[I 2023-10-03 13:10:12.384 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-10-03 13:10:12.387 ServerApp] notebook | extension was successfully loaded.
[I 2023-10-03 13:10:12.388 ServerApp] Serving notebooks from local directory: /home/varun/ocaml-joy
[I 2023-10-03 13:10:12.389 ServerApp] Jupyter Server 2.7.3 is running at:
[I 2023-10-03 13:10:12.389 ServerApp] http://localhost:8888/tree?token=3dd7d613eff2ff592aab7f628e42df261664fce736f2fa43
[I 2023-10-03 13:10:12.389 ServerApp]     http://127.0.0.1:8888/tree?token=3dd7d613eff2ff592aab7f628e42df261664fce736f2fa43
[I 2023-10-03 13:10:12.389 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-10-03 13:10:12.511 ServerApp] 

    To access the server, open this file in a browser:
        file:///home/varun/.local/share/jupyter/runtime/jpserver-8647-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/tree?token=3dd7d613eff2ff592aab7f628e42df261664fce736f2fa43
        http://127.0.0.1:8888/tree?token=3dd7d613eff2ff592aab7f628e42df261664fce736f2fa43
[I 2023-10-03 13:10:14.851 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server

and I haven't updated the shell after jupyter installation

AryanGodara commented 1 year ago

There seems to be an issue with your local python and pip installation. I would suggest a clean reinstall of python3.

But before you do this Try to follow the steps above again, and make sure your python and pip installations are correct

Sudha247 commented 1 year ago

As Aryan suggested above, it might help to do a clean installation of python3 agin.

although I am able to access jupyter notebook using the following commands

I think this is fine as long as you're able to access the jupyter notebook. Are you able to select OCaml kernel and run some basic code like addition?

FanyamTerkuma commented 1 year ago

I have successfully setup OCaml on my machine and OCaml kernel in my jupyter. will proceed to installation and setup of the graphics library.

Sudha247 commented 1 year ago

Hi @FanyamTerkuma, thanks for your interest. Since @godplayer56 has picked up this issue, could you please take up a sub-task from #3?

AryanGodara commented 1 year ago

I have successfully setup OCaml on my machine and OCaml kernel in my jupyter. will proceed to installation and setup of the graphics library.

Hello @FanyamTerkuma I'm glad you were able to get ocaml kernel running. You can take a look at #3 to see how to proceed further with examples

godplayer56 commented 1 year ago

As Aryan suggested above, it might help to do a clean installation of python3 agin.

although I am able to access jupyter notebook using the following commands

I think this is fine as long as you're able to access the jupyter notebook. Are you able to select OCaml kernel and run some basic code like addition?

Hii @Sudha247 and @AryanGodara , I did a complete reinstall of python and pip.

I also installed the graphics and dune libraries and was also able to run the examples using exec command on my local laptop.

Jupyter lab and notebook are installing perfectly this time although whenever I open jupyter notebook I am unable to change the kernel from python3 to OCaml.

How should I configure this issue?

Sudha247 commented 1 year ago

When you create a new notebook, you can choose the kernel then. Does that work?

AryanGodara commented 1 year ago

When you create a new notebook, you can choose the kernel then. Does that work?

They asked me on discord, they can o ly see the the Python Kernel, and are not getting option to select OCaml kernel

joanita-51 commented 1 year ago

The examples are working well on my side image

godplayer56 commented 1 year ago

Hii @Sudha247 , I wasn't able to choose OCaml kernel when I open jupyter notebook