Poetry can't use vscode interactive window with ipykernel
Description
I'm using vscode v. 1.102.3.
When I add the ipykernel and I use the interactive window it just says "connection closed".
I have tried without poetry i.e just my global python, and that works fine. I have also tried using venv to manage packages and that works fine aswell.
I have tried to create new environements and also with just the most simple pyproject.toml
[tool.poetry]
name = "jupyter-test"
version = "0.1.0"
description = ""
authors = [""]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.12"
ipykernel = "6.29.3"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
it fails.
Note, I can in my script e.g main.py "send" it to the interactive window, but if I go to the "terminal" in that window and try to run something, it just says "connection closed"
Workarounds
No
Poetry Installation Method
pip
Operating System
MacOs
Poetry Version
1.8.5
Poetry Configuration
cache-dir = "/Users/jakob/Library/Caches/pypoetry"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/jakob/Library/Caches/pypoetry/virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = true
Python Sysconfig
No response
Example pyproject.toml
[tool.poetry]
name = "jupyter-test"
version = "0.1.0"
description = ""
authors = [""]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.12"
ipykernel = "6.29.3"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Poetry Runtime Logs
seems unlikely that poetry is doing anything wrong here, you will likely have to dig deeper yourself to figure out what is going on
WHen not using poetry it works just fine, as stated. I can't recreate the issue unless I use a poetry environment
seems unlikely that poetry is doing anything wrong here, you will likely have to dig deeper yourself to figure out what is going on
WHen not using poetry it works just fine, as stated. I can't recreate the issue unless I use a poetry environment
Please come back when you have some new information eg identifying what it is that you think poetry is doing wrong.