Jupyter Notebook无法在conda环境中加载已安装的软件包 [英] Jupyter notebook can't load installed package in conda environment

查看:827
本文介绍了Jupyter Notebook无法在conda环境中加载已安装的软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个conda环境:

I've created a conda environment:

$ conda create --name py3 matplotlib scipy astropy photutils

一切都正确安装,包括从 http://ssb.stsci安装的photutils软件包. edu/astroconda 频道.

Everything installed properly, including the photutils package that is installed from the http://ssb.stsci.edu/astroconda channel.

现在我激活环境并打开Jupyter笔记本:

Now I activate the environment and open a Jupyter notebook:

$ source activate py3
(py3) $ jupyter notebook

使用py3作为 Default 环境,并安装photutils

With py3 as the Default environments, and photutils installed

我打开一个使用 Default 内核的新笔记本,并尝试加载photutils

I open a new notebook that uses the Default kernel and attempt to load photutils

将无法正常工作.

这是怎么回事?我唯一奇怪的是,Jupyter在Conda选项卡中将photutils软件包的名称显示为http://ssb.stsci.edu/astroconda::photutils0.4.这是问题吗?如果是这样,我该如何解决?

What is going on here? The only thing that I find strange is that the name of the photutils package is shown as http://ssb.stsci.edu/astroconda::photutils0.4 by Jupyter in the Conda tab. Is this the issue? If so, how can I fix this?

推荐答案

default内核安装在安装了Jupyter Notebook的环境中.您要么需要1)在py3环境中安装notebook pacakge,要么2)在py3环境中安装ipykernel软件包并从根环境启动Notebook服务器,然后启动新的Notebook (现在是新添加的)py3内核.

The default kernel is installed in the environment where the Jupyter Notebook is installed. You either need to either 1) install the notebook pacakge in the py3 environment, or 2) install the ipykernel package in the py3 environment and launch the Notebook server from the root environment, then start a new Notebook with the (now newly added) py3 kernel.

这篇关于Jupyter Notebook无法在conda环境中加载已安装的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆