Python 在';pip安装谷歌云语音&x27;

Python 在';pip安装谷歌云语音&x27;,python,pip,google-cloud-speech,Python,Pip,Google Cloud Speech,谢谢你的阅读 我确实需要你的帮助 我想安装google cloud speech,所以我输入了 “pip安装谷歌云语音” 在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

谢谢你的阅读

我确实需要你的帮助

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

“pip安装谷歌云语音”

在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\
收集谷歌云语音
使用缓存的google_cloud_speech-0.32.0-py2.py3-none-any.whl
收集请求=2.18.4(来自谷歌云语音)
使用缓存请求-2.18.4-py2.py3-none-any.whl
收集googleapis通用原型[grpc]=1.5.2(来自谷歌云语音)
使用缓存的googleapis-common-protos-1.5.3.tar.gz
从命令python setup.py egg_info完成输出:
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“c:\users\developer\appdata\local\programs\python\python36-32\lib\site packages\setuptools\\uuuuu init\uuuuu.py”,第10行,在
从setuptools.extern.six.moves导入过滤器、过滤器模拟、映射
文件“c:\users\developer\appdata\local\programs\python\python36-32\lib\site packages\setuptools\extern\ \uuuuuuu init\uuuuuu.py”,第1行,在
从pkg_resources.extern导入供应商导入器
文件“c:\users\developer\appdata\local\programs\python\python36-32\lib\site packages\pkg\u resources\uuuuu init\uuuuu.py”,第3017行,在
@_把你叫到一边
文件“c:\users\developer\appdata\local\programs\python\python36-32\lib\site packages\pkg\u resources\uuuuuuuu init\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
f(*args,**kwargs)
文件“c:\users\developer\appdata\local\programs\python\python36-32\lib\site packages\pkg\u resources\uuuuuu init\uuuuuu.py”,第3045行,位于“初始化”主工作集中
dist.activate(replace=False)
文件“c:\users\developer\appdata\local\programs\python\python36-32\lib\site packages\pkg\u resources\uuuuu init\uuuuu.py”,第2577行,在activate中
声明_名称空间(pkg)
文件“c:\users\developer\appdata\local\programs\python\python36-32\lib\site packages\pkg\u resources\uuuuu init\uuuuu.py”,第2151行,位于declare\u命名空间中
_句柄(packageName,路径项)
文件“c:\users\developer\appdata\local\programs\python\python36-32\lib\site packages\pkg\u resources\uuuuu init\uuuuu.py”,第2091行,位于\u handle\n
_重建模块路径(路径、packageName、模块)
文件“c:\users\developer\appdata\local\programs\python\python36-32\lib\site packages\pkg\u resources\uuuuuu init\uuuuuuu.py”,第2120行,位于\u rebuild\u mod\u路径中
排序(键=系统路径中的位置)
AttributeError:“\u NamespacePath”对象没有“sort”属性
----------------------------------------
命令“python setup.py egg_info”失败,错误代码为C:\Users\develi~1\AppData\Local\Temp\pip-build-91vxtz3t\googleapis common protos中的1\

我遇到了与您相同的问题,并找到了解决方案

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

pip install --upgrade pip
pip install --upgrade setuptools
pip install google-cloud

我和你有同样的问题,并找到了解决办法

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

pip install --upgrade pip
pip install --upgrade setuptools
pip install google-cloud

从堆栈跟踪中可能会出现重复的情况—您似乎正在使用python 3.6。你能试着用pip3而不是pip来运行吗?从堆栈跟踪来看,可能是重复的。看起来你在使用Python3.6。你能试着用pip3代替pip跑步吗?