pythonpython-can

Windows-curses install on ubuntu


I am trying to install a package (python-can) by running pip2 install python-can and I get the following errors:

Collecting windows-curses (from python-can)
ERROR: Could not find a version that satisfies the requirement windows-curses (from python-can) (from versions: none)

Error: No matching distribution found for windows-curses (from python-can)

Any suggestions? I am on Ubuntu 16.04.


Solution

  • Updated answer: Added information about installing python-can on Windows OS.

    See https://python-can.readthedocs.io/en/master/installation.html#windows-dependencies

    Please note that because of the IO nature, when using python-can on a Windows OS machine, it will require additional drivers or a back-end engine. First install one of the listed options from the install link. Then try pip installing python-can.

    Install can with pip: pip install python-can

    Notice the paragraphs below:
    "As most likely you will want to interface with some hardware, you may also have to install platform dependencies. Be sure to check any other specifics for your hardware in CAN Interface Modules."

    Windows dependencies:
    Kvaser (one of many options)
    To install python-can using the Kvaser CANLib SDK as the backend:

    Install the latest stable release of Python. Install Kvaser’s latest Windows CANLib drivers. Test that Kvaser’s own tools work to ensure the driver is properly installed and that the hardware is working.

    Original Answer:
    (Original answer directly addressed the error message. Provided help to rule out potential error being related to Python's curses library install issue.)

    If you are using Python 3.6+, curses seem to be a part of the built-in Python for Ubuntu OS so there is nothing to install. You initialize a session to start using it.

    import curses
    stdscr = curses.initscr()
    

    https://docs.python.org/3/howto/curses.html