&p?pip install google-cloud-speech'

时间:2018-02-26 10:48:37

标签: python pip google-cloud-speech

感谢阅读。

我确实需要你的帮助。

我想安装google-cloud-speech,所以我输入了

'点击安装google-cloud-speech'

cmd.exe中的

(Windows 10)

但发生了错误。

有没有正确的解决方法,请让我知道。

感谢。

Collecting google-cloud-speech
  Using cached google_cloud_speech-0.32.0-py2.py3-none-any.whl
Collecting requests<3.0dev,>=2.18.4 (from google-cloud-speech)
  Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting googleapis-common-protos[grpc]<2.0dev,>=1.5.2 (from google-cloud-speech)
  Using cached googleapis-common-protos-1.5.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\developer\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\__init__.py", line 10, in <module>
        from setuptools.extern.six.moves import filter, filterfalse, map
      File "c:\users\developer\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
        from pkg_resources.extern import VendorImporter
      File "c:\users\developer\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 3017, in <module>
        @_call_aside
      File "c:\users\developer\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 3003, in _call_aside
        f(*args, **kwargs)
      File "c:\users\developer\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 3045, in _initialize_master_working_set
        dist.activate(replace=False)
      File "c:\users\developer\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2577, in activate
        declare_namespace(pkg)
      File "c:\users\developer\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2151, in declare_namespace
        _handle_ns(packageName, path_item)
      File "c:\users\developer\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2091, in _handle_ns
        _rebuild_mod_path(path, packageName, module)
      File "c:\users\developer\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2120, in _rebuild_mod_path
        orig_path.sort(key=position_in_sys_path)
    AttributeError: '_NamespacePath' object has no attribute 'sort'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\DEVELO~1\AppData\Local\Temp\pip-build-91vxtz3t\googleapis-common-protos\

1 个答案:

答案 0 :(得分:1)

我遇到了与您相同的问题并找到了解决方案on the Google Platform Git

就我而言,这是因为pip并不是最新的。只是做:

byte[] responseData = w.UploadValues("http://imgur.com/api/upload.xml", values);
using(var ms = new MemoryStream(responseData)) 
{
var responseXml = XDocument.Load(ms);
}