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

时间:2018-04-04 10:28:18

标签: python pip twisted ibm-watson

我正在尝试使用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:\python36\lib\site-packages (from watson-developer-cloud>=1.2.1)
Requirement already up-to-date: python_dateutil>=2.5.3 in c:\python36\lib\site-packages (from watson-developer-cloud>=1.2.1)
Requirement already up-to-date: autobahn>=0.10.9 in c:\python36\lib\site-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:\python36\lib\site-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: certifi>=2017.4.17 in c:\python36\lib\site-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:\python36\lib\site-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:\python36\lib\site-packages (from requests<3.0,>=2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: six>=1.5 in c:\python36\lib\site-packages (from python_dateutil>=2.5.3->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: txaio>=2.7.0 in c:\python36\lib\site-packages (from autobahn>=0.10.9->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: zope.interface>=4.0.2 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: constantly>=15.1 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: incremental>=16.10.1 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: Automat>=0.3.0 in c:\python36\lib\site-packages (from Twisted>=13.2.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: hyperlink>=17.1.1 in c:\python36\lib\site-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:\python36\lib\site-packages (from service-identity>=17.0.0->watson-developer-cloud>=1.2.1)
Requirement already up-to-date: setuptools in c:\python36\lib\site-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:\python36\python.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('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\IPC_AD~1\AppData\Local\Temp\pip-tqzdkhaj-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\twisted
    copying src\twisted\copyright.py -> build\lib.win-amd64-3.6\twisted
    copying src\twisted\plugin.py -> build\lib.win-amd64-3.6\twisted
    copying src\twisted\_version.py -> build\lib.win-amd64-3.6\twisted
    copying src\twisted\__init__.py -> build\lib.win-amd64-3.6\twisted
    . 
    . 
    . 
    . 
    copying src\twisted\words\xish\xpathparser.g -> build\lib.win-amd64-3.6\twisted\words\xish
    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

3 个答案:

答案 0 :(得分:0)

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

这看起来像命名惯例。

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

答案 1 :(得分:0)

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

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

答案 2 :(得分:-1)

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

使用手动下载并安装Twisted 17.9.0 pip install Twisted-17.9.0-cp36-cp36m-win32.whl 它起作用了。