question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No module named '_curses'

See original GitHub issue

First of all, thanks a lot for your work. epr looks fantastic and I can’t wait to be able to use it.

I was trying to install it on SailfishOS using pip but I got an error during installation related to _curses module missing. I tried also to execute the epr.py file directly fetched from git, but I get a similar issue:

[nemo@Sailfish Downloads]$ python3 epr.py 
Traceback (most recent call last):
  File "epr.py", line 50, in <module>
    import curses
  File "/usr/lib/python3.8/curses/__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

Here are the ncurses packages I have currently instaled:

Information for package ncurses:
--------------------------------
Repository     : jolla                           
Name           : ncurses                         
Version        : 6.1+git1-1.4.1.jolla            
Arch           : armv7hl                         
Vendor         : meego                           
Installed Size : 167.7 KiB                       
Installed      : Yes (automatically)             
Status         : up-to-date                      
Source package : ncurses-6.1+git1-1.4.1.jolla.src
Summary        : Ncurses support utilities       

Information for package ncurses-base:
-------------------------------------
Repository     : jolla                           
Name           : ncurses-base                    
Version        : 6.1+git1-1.4.1.jolla            
Arch           : armv7hl                         
Vendor         : meego                           
Installed Size : 320.4 KiB                       
Installed      : Yes (automatically)             
Status         : up-to-date                      
Source package : ncurses-6.1+git1-1.4.1.jolla.src
Summary        : Descriptions of common terminals

Information for package ncurses-devel:
--------------------------------------
Repository     : jolla                                    
Name           : ncurses-devel                            
Version        : 6.1+git1-1.4.1.jolla                     
Arch           : armv7hl                                  
Vendor         : meego                                    
Installed Size : 352.7 KiB                                
Installed      : Yes                                      
Status         : up-to-date                               
Source package : ncurses-6.1+git1-1.4.1.jolla.src         
Summary        : Development files for the ncurses library

Information for package ncurses-libs:
-------------------------------------
Repository     : jolla                           
Name           : ncurses-libs                    
Version        : 6.1+git1-1.4.1.jolla            
Arch           : armv7hl                         
Vendor         : meego                           
Installed Size : 504.3 KiB                       
Installed      : Yes (automatically)             
Status         : up-to-date                      
Source package : ncurses-6.1+git1-1.4.1.jolla.src
Summary        : Ncurses libraries 

I tried installing ncurses-libs and ncurses-term but that didn’t help. I couldn’t see the minimal ncurses versions epr depend on in the README. Does it need a more recent installation of ncurses?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Kabouikcommented, Jun 4, 2020

Uh, no I don’t think that’s correct. SailfishOS most definitely is Linux. It runs a Linux kernel, has a full blown / and /home, runs Wayland, bash by default, installs rpm packages with zypper, can run flatpaks, and has all base packages other distributions have.

That does not mean epr can run easily on it, perhaps some required dependencies are not available in the repository, but I don’t know which ones I should check. I have other ncurses applications running on it at the moment, but I don’t know if they use the python curses or the base Linux ncurses. Do you know if somehow python curses is limited to some architectures only, and is available for arm for instance?

0reactions
Kabouikcommented, Jun 10, 2020

Just wanted to let you know that in the end, since the issue probably is on my end with Python being built without curses, I installed bk through Rust, which is inspired by your work on epr. It works for me thanks to the easy Rust install, but epr will probably work on my device too once Python is updated.

The problem I have right now is I manually installed a version of Python built with curses, but it’s version 3.7 whereas the version I had previously from my official distribution repository was 3.8, and somehow some apps manage to use Python 3.7 (like glances or rtv), but some others probably still try to use the most recent python3 version even though it was not built with curses, like epr and term-tris. Hopefully this will all get solved when Python 3.8 is updated with curses support and I can scrap the community built version of Python 3.7.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error no module named curses - python - Stack Overflow
install curses (I think in windows its ncurses) your telnetserver library may not be compatible with windows youtube.com/watch?v=V_MNiXCPQAY · If memory serves, ...
Read more >
Why is that showing "no module named curses in python while ...
Why is that showing "no module named curses in python while ... It's not pre-installed in windows. Use $ ./python -m pip install...
Read more >
ModuleNotFoundError: No module named '_curses' : r/Python
ModuleNotFoundError: No module named '_curses' · Typically, if a module name starts with an underscore, it means that it's actually a native ...
Read more >
ModuleNotFoundError: No module named 'curses-snake'
ModuleNotFoundError: No module named 'curses-snake' ... How to remove the ModuleNotFoundError: No module named 'curses-snake' error? ... Hi,. In your python ...
Read more >
curses — Terminal handling for character-cell displays ...
Source code: Lib/curses The curses module provides an interface to the curses library, the de-facto standard for portable advanced terminal handling.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found