簡體   English   中英

IBM Watson自然語言理解API的導入錯誤

[英]Import Error of IBM Watson Natural Language Understanding API

我現在正嘗試使用IBM Watson Natural Language了解API來提取關鍵字。 我按照說明安裝了watson_developer_cloud。 但是,導入NaturalLanguageUnderstandingV1時遇到錯誤。 你能幫我嗎? 謝謝!

  from watson_developer_cloud import NaturalLanguageUnderstandingV1
  Traceback (most recent call last):

  File "<ipython-input-11-ab5aa6f014f4>", line 1, in <module>
  from watson_developer_cloud import NaturalLanguageUnderstandingV1

  File "C:\Users\yipin\Anaconda3\envs\tensorflow\lib\site- 
  packages\watson_developer_cloud\__init__.py", line 30, in <module>
  rom .speech_to_text_v1 import SpeechToTextV1

  File "C:\Users\yipin\Anaconda3\envs\tensorflow\lib\site- 
  packages\watson_developer_cloud\speech_to_text_v1.py", line 74, in <module>
from watson_developer_cloud.websocket import RecognizeCallback, RecognizeListener

   File "C:\Users\yipin\Anaconda3\envs\tensorflow\lib\site-packages\watson_developer_cloud\websocket\__init__.py", line 18, in <module>
from .speech_to_text_websocket_listener import RecognizeListener

   File "C:\Users\yipin\Anaconda3\envs\tensorflow\lib\site-packages\watson_developer_cloud\websocket\speech_to_text_websocket_listener.py", line 21, in <module>
from twisted.internet import ssl, reactor

  File "C:\Users\yipin\Anaconda3\envs\tensorflow\lib\site-packages\twisted\internet\ssl.py", line 59, in <module>
from OpenSSL import SSL

  File "C:\Users\yipin\Anaconda3\envs\tensorflow\lib\site-packages\OpenSSL\__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL

  File "C:\Users\yipin\Anaconda3\envs\tensorflow\lib\site-packages\OpenSSL\crypto.py", line 16, in <module>
from OpenSSL._util import (

  File "C:\Users\yipin\Anaconda3\envs\tensorflow\lib\site-packages\OpenSSL\_util.py", line 6, in <module>
from cryptography.hazmat.bindings.openssl.binding import Binding

  File "C:\Users\yipin\Anaconda3\envs\tensorflow\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py", line 13, in <module>
from cryptography.hazmat.bindings._openssl import ffi, lib

  ImportError: DLL load failed: The operating system cannot run %1.

以管理員身份重新安裝watson-cloud-developer之后。 我解決了問題。 看來,如果我們不以管理員身份運行pip install命令,則該軟件包將無法正確安裝。

暫無
暫無

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

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