1.安装pywin32
(1)相关网站上下载
下载地址:https://sourceforge.net/projects/pywin32/files/pywin32/
不需要填写邮箱,但是要注意看网页说明
Welcome to the downloads for pywin32. The SourceForge file system is horrible, making it very painful to locate the latest build - please follow the instructions below. To download pywin32: * Select the "Browse All Files" link, then navigate to the "pywin32" folder and select the latest available build (currently Build 218) * Select the installer executable for your system. Note that there is one download package for each supported version of Python - please check what version of Python you have installed and download the corresponding package. Some packages have a 32bit and a 64bit version available - you must download the one which corresponds to the Python you have installed. Even if you have a 64bit computer, if you installed a 32bit version of Python you must install the 32bit version of pywin32. To determine what version of Python you have, just start Python and look at the first line of the banner. A 32bit build will look something like: Python 2.7.2+ ... [MSC v.1500 32 bit (Intel)] on win32 ^^^^^^^^^^^^^^ While a 64bit build will look something like: Python 2.7.2+ ... [MSC v.1500 64 bit (AMD64)] on win32 ^^^^^^^^^^^^^^ If the installation process informs you that Python is not found in the registry, it almost certainly means you have downloaded the wrong version - either for the wrong version of Python, or the wrong "bittedness".
大概意思就是,你要根据python版本和自己的电脑去选择,比如我的:
我当时选择的是:
但是我就悲催的不行,我被告知pywin32告知找不到我的python3.5.......
(2)第二种方法简直太简单了吧!!!
https://blog.csdn.net/youzhouliu/article/details/82744417
这个文章里面已经很详细了
注:1.因为我的python并不在C盘,而是D:/Anaconda里面,所以文章里“pip install speech”是在Anaconda Prompt中完成
2.可能有人在import speech中出现syntax error print 的问题的话
只需要找到Anaconda/Lib/site-packages/speech.py 修改一下第57行的代码,把print后面的类容用括号括起来,如print(...)
最后cmd中完成简单测试
至于为什么在Anaconda才完成了speech的下载,我一知半解就不写出来了,误人子弟
如果有大神清楚的话,小弟必定拜访请教!