My config contains the following:
(use-package python
:ensure nil
:mode ("\\.py\\'" . python-mode)
("\\.ipynb\\'" . python-mode) ;; Add this line for ipynb files
:interpreter ("python" . python-mode)
:config
;; Enable syntax highlighting
(setq python-indent-offset 4)
(setq font-lock-maximum-decoration t)
(add-hook 'python-mode-hook
(lambda ()
(font-lock-mode 1))))
(use-package code-cells
:hook (python-mode . code-cells-mode-maybe)
)
At some point code-cells worked but it stopped working (concerning ipynb conversion).
I'm trying to open (and convert) even a very simple ipynb file as test.ipynb:
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "dc0fcf45",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"this is a test\n"
]
}
],
"source": [
"print(\"this is a test\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b7a9966f",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "/gnu/store/xsflhzksdnlwsigw9iicbg99qmh5hz82-python-3.10.7/bin/python3",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
My config contains the following:
At some point code-cells worked but it stopped working (concerning ipynb conversion).
I'm trying to open (and convert) even a very simple ipynb file as test.ipynb:
{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "dc0fcf45", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "this is a test\n" ] } ], "source": [ "print(\"this is a test\")" ] }, { "cell_type": "code", "execution_count": null, "id": "b7a9966f", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "/gnu/store/xsflhzksdnlwsigw9iicbg99qmh5hz82-python-3.10.7/bin/python3", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.7" } }, "nbformat": 4, "nbformat_minor": 5 }