Pycharm jupyter笔记本wsl:未安装Jupyter程序包 [英] Pycharm jupyter notebook wsl: Jupyter package is not installed
问题描述
我想在Pycharm中使用Jupyter笔记本.项目解释器是来自WSL(ubuntu 18.04)内部虚拟环境的python2.7.
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).
Jupiter软件包已正确安装在虚拟环境中(我可以通过jupyter notebook
运行它).
The Jupiter package is correctly installed inside the virtual environment (I can run it by jupyter notebook
).
我的问题是,当我想在Pycharm中使用Jupyter笔记本时,出现以下错误:Run Error Jupyter package is not installed
(见图).
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).
知道这是怎么回事吗?
推荐答案
我在Python 3中遇到了这个问题.我相信他们也应该为您解决问题:
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:
-
我安装了Jupyter Lab. Pycharm仅适用于Jupyter Notebook.长话短说,如果您安装了Jupyter Lab,则需要使用以下方法卸载所有软件包:
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:
$点冻结| xargs pip卸载-y
$ pip freeze | xargs pip uninstall -y
重新启动计算机
确保通过pycharm说明设置了WSL: WSL pycharm说明
Make sure WSL is set up through pycharm instructions: wsl pycharm instructions
在Pycharm中,打开一个.ipynb文件.单击"Managed Jupyter服务器"下拉菜单,它在文本编辑器的上方.选择配置Jupyter服务器".检查配置的服务器.
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.
在wsl终端中,键入jupyter notebook.复制并粘贴如下所示的文本: http://localhost:8888/?token = 874asdf687asd6fasd8f74ds6f4s9d8a Pycharm中配置好的服务器框.
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.
就是这样.您现在应该可以在pycharm中运行jupyter细胞.
That's it. You should be able to run the jupyter cells in pycharm now.
这篇关于Pycharm jupyter笔记本wsl:未安装Jupyter程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!