解决Chaquopy在AS中pip安装过慢的问题

一开始没有指定其他镜像源:

python {
    
    
    // 指定python路径
    buildPython "F:/Anaconda3/python.exe"
    pip {
    
    
        install "numpy"
        install "pandas"
    }
}

然后下载时我们发现:
在这里插入图片描述
默认扫描的是:
https://pypi.org/simplehttps://chaquo.com/pypi-7.0,导致速度很慢。
解决方案:使用其他镜像源

python {
    
    
    // 指定python路径
    buildPython "F:/Anaconda3/python.exe"
    pip {
    
    
        options "--index-url", "https://pypi.tuna.tsinghua.edu.cn/simple/"
        options "--extra-index-url", "http://pypi.mirrors.ustc.edu.cn/simple/"
        install "numpy"
        install "pandas"
    }
}

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Cyril_KI/article/details/112638261