在 Python 中,你可以使用 pip
命令的 --index-url
或 -i
选项来指定自定义的源(即 Python Package Index,PyPI)地址。这是一个例子:
pip install --index-url https://example.com/simple package_name
或者使用短选项:
pip install -i https://example.com/simple package_name
在这个例子中,将使用 https://example.com/simple
作为 PyPI 源地址来安装 package_name
。请将其替换为你想要使用的实际源地址。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:python pip命令怎样指定安装源