如果因为公司网络限制问题,pip 安装软件包需要设置代理……则如下进行,

 

Windows

例如要安装 mysql-connector-python,注意 proxy 要用双引号括起来,

 ...\>  pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ mysql-connector-python --proxy="http://serverIP:port"

 

Linux

例如要安装 mysql-connector-python,

$ sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ mysql-connector-python --proxy="http://serverIP:port"

 

完。

 

相关文章:

  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2021-12-06
  • 2021-06-04
猜你喜欢
  • 2022-02-28
  • 2021-07-30
  • 2022-01-20
  • 2021-10-15
  • 2022-12-23
  • 2021-12-06
相关资源
相似解决方案