简体   繁体   English

ModuleNotFoundError:没有名为“pyinputplus”的模块

[英]ModuleNotFoundError: No module named 'pyinputplus'

When i try to run this code in google colab it show module not found error.当我尝试在 google colab 中运行此代码时,它显示未找到模块错误。 This was my code这是我的代码

   import pyinputplus as pyip

   response = pyip.inputNum('Enter num: ')

I think you may need to install PyInputPlus in your google colab.我认为您可能需要在您的 google colab 中安装 PyInputPlus。 You can install in google colab using this !pip install PyInputPlus .您可以使用!pip install PyInputPlus在 google colab 中安装。 You need to add "."您需要添加“。” before pip statment.在 pip 声明之前。 That will help you to run terminal commands from your notebook这将帮助您从笔记本运行终端命令

First, you have to install that module in google colab.首先,您必须在 google colab 中安装该模块。 By using:通过使用:

pip install pyinputplus

Then, you can import it by:然后,您可以通过以下方式导入它:

import pyinputplus as pyip

and thnn, you will get result like this . thnn,你会得到这样的结果。

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

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