caffe2源码安装中,cmake使用Python版本不对的问题

源码安装caffe2时,在最后一步cmake时,总显示缺少模块,但事实是系统已经安装相应模块。诸如:'Missing build dependency: Unable to import the `typing` module. '等等大量错误。

由于我使用的是anaconda的Python。而在终端输入$(which python)命令,所显示的版本与anaconda内不是同一版本。编译时默认使用的Python版本是/usr/bin内系统自带的Python,导致大量模块无法导入,不能cmake。

最终解决办法是直接自己指定使用的Python版本

/home/user/anaconda3/bin/python setup.py install

猜你喜欢

转载自blog.csdn.net/qq_36782560/article/details/82832962