python - CMake 不显示版本
问题描述
$cmake --version
Traceback (most recent call last):
File "/home/pranto/.local/bin/cmake", line 7, in <module>
from cmake import cmake
ImportError: cannot import name 'cmake'
Ubuntu 18.04,Python = 3.6。
我最近将我的 python 版本从 2.7 升级到 3.6,然后开始看到这个错误。我该如何解决这个问题?
解决方案
要记录 OP 的解决方案:
您必须在新的 Python 环境(3.6)中重新安装CMake:
pip3 install cmake
推荐阅读
- css - 使用Vue js在相对div内动态Css缩放绝对div
- javascript - 一切都是真的(中级 Javascript 算法)
- spring - 尤里卡、配置和管理仅在一项服务中
- kubernetes - k8s PodSecurityPolicy 的 Helm 模板
- python - 将文本转换为字段 python
- electron - 如何防止任务管理器关闭电子应用程序
- typescript - 初始化条带变量后如何更改条带区域设置
- python - 为什么 scipy.stats.gamma.pdf 返回一个 0 数组?
- python - Django 错误:'list_filter[2]' 的值引用了 'is_active',它不引用字段。?
- laravel - 将数据从一个表移动到另一个表时数组到字符串的转换错误