为什么即使安装了Jupyter Notebook(Python 3.6),也无法在我的Jupyter Notebook中导入utils?

编程入门 行业动态 更新时间:2024-10-27 14:34:20
本文介绍了为什么即使安装了Jupyter Notebook(Python 3.6),也无法在我的Jupyter Notebook中导入utils?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经使用conda安装了软件包utils,但是当我尝试将其导入Jupyter Notebook时,却出现了异常:

I have installed the package utils using conda but when I try to import it in my Jupyter Notebook I get an exception:

import utils --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-4-32411ba4e9a6> in <module>() ----> 1 import utils ModuleNotFoundError: No module named 'utils'

如果这次我尝试使用pip再次安装,则会收到预期的消息:

If I try installing again using pip this time I get the expected message:

(base) C:\Users\Alienware\Documents>pip install python-utils Requirement already satisfied: python-utils in c:\programdata\anaconda3\lib\site-packages (2.3.0) Requirement already satisfied: six in c:\programdata\anaconda3\lib\site-packages (from python-utils) (1.10.0)

其他模块的导入没有问题(例如featuretools).

Other modules are imported without any problem (e.g. featuretools).

推荐答案

您已经安装了 python-utils ,但正在导入 utils .这是两个不同的程序包.如果要使用 utils 软件包,请使用 pip install utils 进行安装.否则,如果要使用该软件包,请使用 import python_utils .

You have installed python-utils but are importing utils. These are two different packages. If you want to use the utils package, install it with pip install utils. Otherwise, use import python_utils if you want to use that package.

更多推荐

为什么即使安装了Jupyter Notebook(Python 3.6),也无法在我的Jupyter Notebook中导入utils?

本文发布于:2023-07-05 02:50:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1032110.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:安装了   Jupyter   Notebook   utils   Python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!