想要在windows下安装salt模块,首要要先安装salt模块缺失的依赖环境
1.更新 setuptools
和 wheel
pip install --upgrade setuptools wheel
2. 安装Microsoft Visual C++ 14.0
因为salt模块包包使用了 C/C++ 扩展,需要编译为二进制文件,而在 Windows 系统上需要 Microsoft Visual C++ 编译工具链来完成这个过程
下载地址:Microsoft C++ Build Tools - Visual Studio
所需模块截图,具体的SDK版本号可以调出CMD执行systeminfo命令查看,大版本匹配即可
3. 安装 timelib模块
安装 "Microsoft C++ Build Tools" 后,重新运行命令,将timelib 重新编译并构建
pip install timelib
最后安装pip install salt 即可完成安装