How to use different interpreters for two notebooks?
In same project, I have 2 notebooks `A.ipynb` and `B.ipynb`, I want to use Python 3.10 for `A.ipynb`, use Python 3.14 for `B.ipynb`. How can I do that? I had added two interpreters(Python 3.10 and 3.14).
请先登录再写评论。
Hi Huang, currently, this isn’t implemented - the default Jupyter servers always start with the project’s interpreter. You can, however, work around this by configuring an external Jupyter server with the interpreter you want to use:
- Start the server manually with the interpreter you want:
or
- Copy the full URL (including token) printed in the terminal, for example:
http://127.0.0.1:8888/lab?token=…- In PyCharm, open File | Settings | Jupyter | Jupyter Servers > Add External > paste the server URL with token
- Once connected, open your notebook and choose the kernel corresponding to that interpreter. Please refer to this article for details: https://www.jetbrains.com/help/pycharm/configuring-jupyter-notebook.html
Thanks, I will try it later.