0

I'm trying to install npyscreen to my Python 3.6.3 installation. I used PIP and it seemed to work. However when I run a program with import npyscreen I get this error:

Traceback (most recent call last):
  File "E:\Python\test.py", line 1, in <module>
    import npyscreen
  File "E:\Python\npyscreen.py", line 5, in <module>
    class TestApp(npyscreen.NPSApp):
AttributeError: module 'npyscreen' has no attribute 'NPSApp'

I'm really inexperienced and totally don't understand how PIP works, where it puts things and how I go about setting up paths etc. Can anyone help this beginner get going?

  • Look for the npyscreen source and build from there. If that seems tedious, then try downloading the npyscreen wheel manually and then pip install it. – Sayan Sil Dec 02 '17 at 20:29
  • Try getting the source from here https://pypi.python.org/pypi/npyscreen/ – Sayan Sil Dec 02 '17 at 20:31
  • Thanks. I donwloaded the source and installed it using `python setup.py install` but I still get an error when I try to run the npyscreen demo code: `Traceback (most recent call last): File "C:\Users\glenn\Downloads\npyscreen-4.10.5\EXAMPLE-BOX.py", line 40, in App.run() File "C:\Users\glenn\Downloads\npyscreen- ... Edited because too long ... File "C:\Users\glenn\AppData\Local\Programs\Python\Python36-32\lib\curses\__init__.py", line 30, in initscr fd=_sys.__stdout__.fileno()) AttributeError: 'NoneType' object has no attribute 'fileno'` – Glenn Broadway Dec 03 '17 at 15:50
  • Sweet! If your problem is solved then add an answer and mark it correct for future reference. – Sayan Sil Dec 03 '17 at 15:51
  • Sorry, see above comment Sayan Sil... – Glenn Broadway Dec 03 '17 at 15:55
  • https://stackoverflow.com/questions/45126368/nonetype-object-has-no-attribute-fileno Here is a similar question. – Sayan Sil Dec 03 '17 at 15:58
  • I think I got to the bottom of my issues. After ensuring that Curses was installed properly (I got it from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#curses) I discovered that the npyscreen python code would never run from inside IDLE. Running the python code from a command prompt solves it. – Glenn Broadway Dec 04 '17 at 13:10
  • That website is a blessing. Bookmark it. – Sayan Sil Dec 04 '17 at 14:49

0 Answers0