我正在使用python导入以下内容,但是即使我使用pip安装了这些内容,它也显示错误
进口-
import speech_recognition as sr # importing speech recognition package from google api
# from pygame import mixer
import playsound # to play saved mp3 file
from gtts import gTTS # google text to speech
import os # to save/open files
import wolframpythonalpha # to calculate strings into formula, its a website which provides api, 100 times per day
from selenium import webdriver # to control browser operations
from selenium.webdriver.common.keys import Keys
from io import BytesIO
from io import StringIO
错误-
答案 0 :(得分:0)
我发现有几个软件包需要点子安装。
!pip install SpeechRecognition
!pip install playsound
!pip install gTTS
!pip install wolframalpha
!pip install selenium
注意“!”要在google colab平台上安装软件包,需要在pip前面安装。
我也找不到您引用的“ wolframpythonalpha”包,但我确实找到了Wolframalpha
一旦安装了大多数其他进口产品……
import speech_recognition
import playsound
import os # to save/open files
import wolframalpha
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from io import BytesIO
from io import StringIO
答案 1 :(得分:0)
也许此问题中给出的另一个答案对您都有效,但对我而言没有任何帮助,我不知道为什么,但是当我切换到名为PyCharm的IDE时,一切正常,PyCharm自动安装了这些东西,正在工作。