How can I solve installation error of gTTS?

2019-07-09 05:41发布

问题:

AssertionError: gTTS .dist-info directory not found while installing gTTS

(venv) D:\gui>pip install gTTS
Collecting gTTS
Installing collected packages: gTTS
Exception:
Traceback (most recent call last):
  File "d:\gui\venv\lib\site-packages\pip\_internal\cli\base_command.py", line 143, in main
    status = self.run(options, args)
  File "d:\gui\venv\lib\site-packages\pip\_internal\commands\install.py", line 366, in run
    use_user_site=options.use_user_site,
  File "d:\gui\venv\lib\site-packages\pip\_internal\req\__init__.py", line 49, in install_given_reqs
    **kwargs
  File "d:\gui\venv\lib\site-packages\pip\_internal\req\req_install.py", line 760, in install
    use_user_site=use_user_site, pycompile=pycompile,
  File "d:\gui\venv\lib\site-packages\pip\_internal\req\req_install.py", line 382, in move_wheel_files
    warn_script_location=warn_script_location,
  File "d:\gui\venv\lib\site-packages\pip\_internal\wheel.py", line 326, in move_wheel_files
    assert info_dir, "%s .dist-info directory not found" % req
AssertionError: gTTS .dist-info directory not found

回答1:

Following Steps can be done:

a) Upgrading the setuptools

pip3 install setuptools --upgrade

b) Upgrading the pip

pip3 install pip --upgrade

c) Install gtts again, clearing pip cache

pip3 install --no-cache-dir gTTS

Hope it helps.



标签: pip pycharm