2015-10-21 30 views
0

我遇到安装ncurses的问题Python3。当我做了正常sudo apt-get install ncurses-dev,它似乎安装Python2,但是当我尝试运行我的脚本Python3,它说。在python3上安装NCurses for Ubuntu

ImportError: No module named curses 

你将如何获得ncursesPython3工作?

回答

0

试试这个:

import curses 

诅咒是ncurses的。它也内置到python中,没有什么可安装的。

Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-65-generic x86_64) 

* Documentation: https://help.ubuntu.com/ 
Last login: Mon Oct 19 19:06:03 2015 from xxx.xxx.xxx.xxx 
[email protected]:~$ python3 
Python 3.4.0 (default, Jun 19 2015, 14:20:21) 
[GCC 4.8.2] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import curses 
>>> 
+0

我已经试过,在我的脚本,它没有工作。 – Solomon

+0

你使用的是什么版本的Ubuntu? – jgritty

+0

我使用的是Ubuntu 14.04.3 LTS – Solomon