簡體   English   中英

沒有模塊名稱“語音識別”

[英]No Module name "Speech recognition"

我已經通過 pip 安裝了 SpeechRecognition

pip install SpeechRecognition 

和conda(因為我在conda下用過virenv)

conda install -c conda-forge speechrecognition

這是我的代碼的一部分,它是一個解決驗證碼的機器人

#system libraries
import os
import random
import time
#selenium libraries
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException   
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
from selenium.common.exceptions import 
UnexpectedAlertPresentException
from selenium.webdriver.chrome.options import Options
#recaptcha libraries
import speech_recognition as sr
sr.__version__

import ffmpy
import requests
import urllib
import pydub

#access to google recaptcha demo 
DRIVER_PATH = 'C:/formation/python/recaptcha_Bot/chromedriver.exe'

driver = webdriver.Chrome(executable_path=DRIVER_PATH)
driver.get("https://www.google.com/recaptcha/api2/demo")

但總是當我運行代碼時它顯示錯誤( not module name "speech-recognition"我想看什么: python/Lib/site-packages/anaconda3/Lib/site-packages我找不到 SpeechRecognition package 但是當我運行 pip 列表時,我發現安裝了 package

這也發生在我身上(IDK 為什么)。

首先我安裝了一個模塊名稱 pipwin 使用

pip install pipwin

然后我用了——

pipwin install SpeechRecognition

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM