简体   繁体   English

无法在 jupyter 中导入已安装的 package

[英]unable to import installed package in jupyter

I have installed the package "vincent" as illustrated below.我已经安装了 package “vincent”,如下图所示。

在此处输入图像描述

However, I can't import it in Jupyter (and I don't understand the explanations elsewhere in Stackoverflow, so I figured I'd ask again.但是,我无法在 Jupyter 中导入它(而且我不理解 Stackoverflow 其他地方的解释,所以我想我会再问一次。

在此处输入图像描述

You could install packages on Jupyter using following commands:您可以使用以下命令在 Jupyter 上安装软件包:

import sys
!{sys.executable} -m pip install vincent

Or you could install using following code或者您可以使用以下代码安装

%%sh
http_proxy=http://10.245.5.340:8080  //change to your proxy localhost address
export http_proxy
https_proxy=https://10.245.5.340:8080 //change to your proxy localhost address
export https_proxy
pip install vincent

It could mean that you installed vincent into a python editor that is not jupyter .这可能意味着您将vincent安装到不是jupyter的 python 编辑器中。 Check to see if you have another python editor that has vincent installed in it.检查您是否有另一个安装了vincent的 python 编辑器。


UPDATE:更新:

Here are the steps:以下是步骤:

  1. Launched Anaconda Prompt推出Anaconda提示

  2. Executed this statement: conda install -c conda-forge vincent执行此语句: conda install -c conda-forge vincent


Be careful when using the base environment for anything.将基础环境用于任何事情时要小心。 From the documentation :文档中:

Do not install, update, remove, or change dependencies.不要安装、更新、删除或更改依赖项。
This WILL lead to broken environments and inconsistent behavior.这将导致破坏环境和不一致的行为。
Use at your own risk.使用风险自负。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM