Python3.7.10环境安装scikit-fda时fdasrsf编译失败求助
解决scikit-fda安装时fdasrsf编译失败的问题
问题原因
从错误日志可以看出,fdasrsf的C源码使用了C99标准特性(在for循环内声明变量),但默认gcc编译命令未启用C99标准,导致编译报错。
解决方案
方法1:设置编译环境变量后安装
在Jupyter Notebook中先指定C99编译标准,再执行安装命令:%env CFLAGS="-std=c99" pip install scikit-fda方法2:单独指定fdasrsf编译选项
先为fdasrsf添加编译参数完成安装,再安装scikit-fda:pip install fdasrsf --global-option=build_ext --global-option="-std=c99" pip install scikit-fda方法3:升级构建工具
先更新pip、setuptools和wheel到最新版本,再尝试安装:pip install --upgrade pip setuptools wheel pip install scikit-fda
以上方法均通过让gcc以C99标准编译fdasrsf的C代码,解决循环变量声明的编译错误。
内容的提问来源于stack exchange,提问作者Abdelkabir
相关产品推荐
相关产品推荐

