坑位
安装好python3.6,glances后运行glances一直提示【Curses module not found. Glances cannot start in standalone mode】,可以看出当前环境缺乏curses模块,找了很多地方也没找到这个包,最终将python2.7环境下curses对应的两个包copy到了python3.6环境下即可
系统环境
- ubuntu
- python3
- glances
glances安装
- 这里推荐通过pip来安装glances,如果用源码包也可以,但是呢会有别的依赖包,比较麻烦
pip3 install glances -i https://pypi.douban.com/simple
- 安装完成后,通过运行glances来测试是否安装成功
- 进入python3交互模式发现,没有curses模块
解决 curses 模块
- 找了很久也是没有发现这个包,最后看到一位大神的解决方案,茅塞顿开,于是乎将ubuntu14自带python2.7环境下的curses包copy到我们当前python3.6即可
- python2.7 curses 包
- cp到 python3.6环境下并修改权限 [chmod 755 curses*]
- 再次编译python3.6
cd /root/Python3.6.10 ./configure make && make install
- 再次进入python3.6交互模式查看是否可以import curses