[英]Why I can not import utils in my Jupyter Notebook (Python 3.6) although it is installed?
I have installed the package utils using conda but when I try to import it in my Jupyter Notebook I get an exception: 我已经使用conda安装了软件包utils,但是当我尝试将其导入Jupyter Notebook时,出现异常:
import utils
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-32411ba4e9a6> in <module>()
----> 1 import utils
ModuleNotFoundError: No module named 'utils'
If I try installing again using pip this time I get the expected message: 如果这次我尝试使用pip再次安装,则会收到预期的消息:
(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)
Other modules are imported without any problem (eg featuretools). 导入其他模块没有任何问题(例如Featuretools)。
You have installed python-utils
but are importing utils
. 您已经安装了
python-utils
但正在导入utils
。 These are two different packages. 这是两个不同的程序包。 If you want to use the
utils
package, install it with pip install utils
. 如果要使用
utils
软件包,请使用pip install utils
进行pip install utils
。 Otherwise, use import python_utils
if you want to use that package. 否则,如果要使用该软件包,请使用
import python_utils
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.