Open drakesiardxy opened 1 year ago
Would be very powerful if poetry had a flag or some way to avoid this. My fork that uses rye for a kernel in the same way, it handles the environment "nesting" fine.
Edit: Poetry doesn't need a flag - but maybe that you create the environment for the nested project explicitly. After that, nested poetry run works fine.
If a poetry pyproject.toml is used to create the environment for the Jupyter lab (adding poetry-kernel as a dependency), then no matter in which working directory the jupyter server is started, any notebook that is opened with the "poetry" kernel will have the Jupyter environment, not the environment of the notebook's project.
Minimal example: https://github.com/drakesiardxy/poetry-kernel-bug To replicate: Create the jupyer-base env and the kernel_a env separately, then start the jupyter server with the first environment and attempt to run
kernel_a.ipynb
using the "Poetry" kernel.pandas
will be missing, because the notebook will have been launched with the environment of the server, not the environment belonging to the notebook's project.