pycharm下配置jupyter,Pycharm jupyter笔记本wsl:未安装Jupyter软件包

本文介绍了如何在PyCharm中使用Python 2.7虚拟环境中已安装的Jupyter Notebook,解决启动时提示包未安装的问题,包括卸载JupyterLab、配置Jupyter Notebook服务器及设置WSL环境的详细步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I would like to use Jupyter notebook inside Pycharm. The project interpreter is a python2.7 from a virtual environment inside WSL (ubuntu 18.04).

The Jupiter package is correctly installed inside the virtual environment (I can run it by jupyter notebook).

My problem is that when I want to use Jupyter notebook inside Pycharm, I get the following error: Run Error Jupyter package is not installed (see picture).

67AWY.png

Any idea what's going on here?

解决方案

I had this problem in Python 3. Below are the steps I took to resolve the issue; I believe they should resolve the issue for you too:

I had Jupyter Lab installed. Pycharm only works with Jupyter Notebook. Long story short, if you have Jupyter Lab installed you need to uninstall all your packages using:

$ pip freeze | xargs pip uninstall -y

Restart your computer

Make sure WSL is set up through pycharm instructions: wsl pycharm instructions

In Pycharm, open an .ipynb file. Click the dropdown that says "Managed Jupyter server" It's right above the text editor. Select "configure Jupyter server". Check configured server.

In your wsl terminal, type jupyter notebook. Copy and paste the text that looks like: http://localhost:8888/?token=874asdf687asd6fasd8f74ds6f4s9d8f7sddf into the cofigured server box in Pycharm.

That's it. You should be able to run the jupyter cells in pycharm now.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值