centos环境python3.6下bpython的安装
注意:python3.6下通过python get-pip.py安装的pip可执行文件名为pip3
pip3 install bpython
......
Successfully installed blessings-1.6.1 bpython-0.17.1 certifi-2018.1.18 chardet-3.0.4 curtsies-0.3.0 greenlet-0.4.13 idna-2.6 pygments-2.2.0 requests-2.18.4 six-1.11.0 typing-3.6.4 urllib3-1.22 wcwidth-0.1.7
貌似安装成功,但是运行bpython报错:
ModuleNotFoundError: No module named '_curses'
解决办法:
1、
yum install ncurses-devel ncurses
(python3.6的Modules源码里面有_curses相关的源码,但Setup里面注释掉了,取消注释编译会报错,后采取yum安装的方式解决了该报错)
2、清理了之前的安装目录/usr/local/python3,重新安装
./configure --prefix=/usr/local/python3
make && make install
重新执行bpthon,报错:
ModuleNotFoundError: No module named 'encodings'