“pip install googlecloudspeech”时出错

2024-06-17 15:13:12 发布

您现在位置:Python中文网/ 问答频道 /正文

谢谢你的阅读。在

我确实需要你的帮助。在

我想安装googlecloudspeech,所以我输入了

“pip安装谷歌云语音”

在命令提示符(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\

Tags: inpydeveloperinitlibpackageslocalline
1条回答
网友
1楼 · 发布于 2024-06-17 15:13:12

我和你有同样的问题,找到了一个解决办法on the Google Platform Git。在

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

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

相关问题 更多 >