安装pywin32遇问题:Jupyter Notebook提示无匹配发行版本
报错信息
ERROR: Could not find a version that satisfies the requirement pywin32 (from versions: none)
ERROR: No matching distribution found for pywin32
Note: you may need to restart the kernel to use updated packages.
解决方案
确认运行环境
pywin32是Windows专属库,若你的Jupyter运行在Linux、macOS等非Windows系统,无法安装该库,无需继续尝试。升级pip
旧版pip可能无法正确检索包,先执行升级命令:python -m pip install --upgrade pip
之后重新执行:pip install pywin32指定兼容版本
若Python版本较新或较旧,需安装匹配的pywin32版本。比如Python 3.9可安装305版本:pip install pywin32==305
可自行确认Python版本对应的pywin32兼容版本。用conda安装(适用于conda环境)
如果Jupyter基于Anaconda/Miniconda,改用conda命令:conda install -c conda-forge pywin32切换国内镜像源
网络或镜像源问题导致无法检索时,使用国内源加速:pip install pywin32 -i https://pypi.tuna.tsinghua.edu.cn/simple
内容的提问来源于stack exchange,提问作者user20817578

