Chaquopy在AS中pip时报错error: CCompiler.compile: Chaquopy cannot compile native code

刚开始使用Chaquopy在AS上安装numpy和pandas时速度很慢,于是想到使用国内镜像源:解决Chaquopy在AS中pip安装过慢的问题
如下所示:

python {
    
    
    // 指定python路径
    buildPython "F:/Anaconda3/envs/py38/python.exe"
    pip {
    
    
        options "--index-url", "https://mirrors.aliyun.com/pypi/simple/"
        options "--extra-index-url", "https://pypi.tuna.tsinghua.edu.cn/simple/"
        install "numpy==1.17.4"
        install "pandas==0.25.3"
        install "scikit-learn==0.22.1"
    }
}

后报错如下:
在这里插入图片描述

按理来说,只要版本号是对的,用外部镜像源是没有关系的,可是还是报错。。。
于是将外部镜像源去掉,即取消"–index-url",便可成功运行,不过下载速度确实慢了很多,修改后如下:

python {
    
    
    // 指定python路径
    buildPython "F:/Anaconda3/envs/py38/python.exe"
    pip {
    
    
        options "--extra-index-url", "https://pypi.tuna.tsinghua.edu.cn/simple/"
        install "numpy==1.17.4"
        install "pandas==0.25.3"
        install "scikit-learn==0.22.1"
    }
}

猜你喜欢

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