我有2个版本的python安装,但cmake使用旧版本。如何强制cmake使用较新的版本? [英] I have 2 versions of python installed, but cmake is using older version. How do I force cmake to use the newer version?

查看:2329
本文介绍了我有2个版本的python安装,但cmake使用旧版本。如何强制cmake使用较新的版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了2个版本的python,但 cmake 正在使用旧版本。如何强制 cmake 使用较新版本?

I have 2 versions of python installed, but cmake is using older version. How do I force cmake to use the newer version?

推荐答案

尝试添加 -DPYTHON_EXECUTABLE:FILEPATH = / path / to / python2.7
可能是路径问题?

Try to add -DPYTHON_EXECUTABLE:FILEPATH=/path/to/python2.7 It might be a path problem?

也可以指定python库的路径,使用你想要的版本:

Also could specify the path to your python library,use your version that you want:

 cmake -DPYTHON_LIBRARIES=/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib .

这篇关于我有2个版本的python安装,但cmake使用旧版本。如何强制cmake使用较新的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆