第一想法是:
pip install Polygon3 -i https://pypi.tuna.tsinghua.edu.cn/simple
而实际会遇到报错
ERROR: Could not build wheels for Polygon3, which is required to install pyproject.toml-based projects
此时,应当关注报错中的:
Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools"
需要
- 安装Microsoft Build Tools for Visual Studio 2019.(以上)
- 在 Build Tools 中,安装“使用C++的桌面开发”并确保安装详细信息的前两项勾选。
- setuptools Python包的版本必须至少为34.4.0。
安装成功后,即可解决