Watson Developer Cloud显示错误:需要Microsoft Visual C ++ 14.0

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Watson Developer Cloud显示错误:需要Microsoft Visual C ++ 14.0相关的知识,希望对你有一定的参考价值。

我正在尝试使用Python进行Watson视觉识别,遵循:https://www.ibm.com/watson/developercloud/visual-recognition/api/v3/python.html?python#introduction

在尝试安装库时:

pip install --upgrade "watson-developer-cloud>=1.2.1"

即使在安装“Microsoft Visual C ++ 14.0”后,我也会收到以下错误,我也卸载了其他版本的MSVC ++。

Collecting watson-developer-cloud>=1.2.1
  Using cached watson-developer-cloud-1.2.1.tar.gz
Requirement already up-to-date: requests<3.0,>=2.0 in c:python36libsite-packages (from watson-developer-cloud>=1.2.1)
Requirement already up-to-date: python_dateutil>=2.5.3 in c:python36libsite-packages (from watson-developer-cloud>=1.2.1)
Requirement already up-to-date: autobahn>=0.10.9 in c:python36libsite-packages (from watson-developer-cloud>=1.2.1)
Collecting Twisted>=13.2.0 (from watson-developer-cloud>=1.2.1)
  Using cached Twisted-17.9.0.tar.bz2
Collecting pyOpenSSL>=16.2.0 (from watson-developer-cloud>=1.2.1)
  Using cached pyOpenSSL-17.5.0-py2.py3-none-any.whl
Collecting service-identity>=17.0.0 (from watson-developer-cloud>=1.2.1)
  Using cached service_identity-17.0.0-py2.py3-none-any.whl
Requirement already up-to-date: idna<2.7,>=2.5 in c:python36libsite-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: certifi>=2017.4.17 in c:python36libsite-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in c:python36libsite-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in c:python36libsite-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: six>=1.5 in c:python36libsite-packages (from python_dateutil>=2.5.3->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: txaio>=2.7.0 in c:python36libsite-packages (from autobahn>=0.10.9->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: zope.interface>=4.0.2 in c:python36libsite-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: constantly>=15.1 in c:python36libsite-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: incremental>=16.10.1 in c:python36libsite-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: Automat>=0.3.0 in c:python36libsite-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: hyperlink>=17.1.1 in c:python36libsite-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Collecting cryptography>=2.1.4 (from pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
  Using cached cryptography-2.2.2-cp36-cp36m-win_amd64.whl
Collecting pyasn1 (from service-identity>=17.0.0->watson-developer-cloud>=1.2.1)
  Using cached pyasn1-0.4.2-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity>=17.0.0->watson-developer-cloud>=1.2.1)
  Using cached pyasn1_modules-0.2.1-py2.py3-none-any.whl
Requirement already up-to-date: attrs in c:python36libsite-packages (from service-identity>=17.0.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: setuptools in c:python36libsite-packages (from zope.interface>=4.0.2->Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=2.1.4->pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
  Using cached cffi-1.11.5-cp36-cp36m-win_amd64.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=2.1.4->pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
  Using cached asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=2.1.4->pyOpenSSL>=16.2.0->watson-developer-cloud>=1.2.1)
  Using cached pycparser-2.18.tar.gz
Installing collected packages: Twisted, pycparser, cffi, asn1crypto, cryptography, pyOpenSSL, pyasn1, pyasn1-modules, service-identity, watson-developer-cloud
  Running setup.py install for Twisted: started
    Running setup.py install for Twisted: finished with status 'error'
    Complete output from command c:python36python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\IPC_AD~1\AppData\Local\Temp\pip-build-ahl2cx7d\Twisted\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersIPC_AD~1AppDataLocalTemppip-tqzdkhaj-recordinstall-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating buildlib.win-amd64-3.6
    creating buildlib.win-amd64-3.6	wisted
    copying src	wistedcopyright.py -> buildlib.win-amd64-3.6	wisted
    copying src	wistedplugin.py -> buildlib.win-amd64-3.6	wisted
    copying src	wisted\_version.py -> buildlib.win-amd64-3.6	wisted
    copying src	wisted\__init__.py -> buildlib.win-amd64-3.6	wisted
    . 
    . 
    . 
    . 
    copying src	wistedwordsxishxpathparser.g -> buildlib.win-amd64-3.6	wistedwordsxish
    running build_ext
    building 'twisted.test.raiser' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

    ----------------------------------------

我试过从.wl安装扭曲

pip install Twisted-17.9.0-cp37-cp37m-win_amd64.whl

pip install Twisted-17.9.0-cp27-cp27m-win32.whl

都失败了,错误:

Twisted-17.9.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.

我使用的是Windows 7 64

答案

unofficial python wheels安装时,你需要为你的wheelpython找到合适的os

这看起来像命名约定。

module  (mod. ver.) (py ver.)  os(32 or 64)  
   ↓        ↓         ↓         ↓
Twisted-17.9.0-cp36-cp36m-win_amd64.whl
另一答案

我通过手动downloading解决了这个问题,并使用以下命令安装“Twisted”库。

pip install Twisted-17.9.0-cp37-cp37m-win_amd64.whl
另一答案

谢谢。这对我也有用。得到了同样的错误。

使用pip install Twisted-17.9.0-cp36-cp36m-win32.whl手动下载并安装Twisted 17.9.0并且它有效。

以上是关于Watson Developer Cloud显示错误:需要Microsoft Visual C ++ 14.0的主要内容,如果未能解决你的问题,请参考以下文章

IBM Watson Alchemy 新闻 iOS SDK Swift

Watson Speech to Text 无法对数据流音频/wav 进行转码

使用 Python SDK 从 HTTP 代理服务器后面调用 Watson Discovery API

iOS/IBM Cloud/Swift:使用 AlamoFire 发布到 Watson API

在 bluemix 上使用 python 调用服务

将 IBM Cloud Object Storage 链接到 Watson Studio 新项目?