Axidraw CLI

Home Evil Mad Scientist Forums AxiDraw Axidraw CLI

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #29401
    Dr. Ricky
    Participant

    Hi all,

    I have been trying to use a Linux machine to work with the CLI for the Axidraw. I successfully installed Python 3.9, and used pip to run the installation instructions. But when I run

    axicli –help

    I get this error

    from lxml import etree
    ImportError: cannot import name ‘etree’ from ‘lxml’ (/opt/lib/python3.9/site-packages/lxml/__init__.py)

    I’ve tried reinstalling lxml (based on some reddit posts) but no luck so far. Any ideas?

    #29402
    Windell Oskay
    Keymaster

    Try python3 -m pip install lxml

    #29403
    Dr. Ricky
    Participant

    Hi, Windell,

    I’ve tried that, no change to the error.

    from lxml import etree
    ImportError: cannot import name ‘etree’ from ‘lxml’ (/opt/lib/python3.9/site-packages/lxml/__init__.py)

    #29404
    Windell Oskay
    Keymaster

    try which python3

    #29405
    Dr. Ricky
    Participant

    I get /opt/bin/python3

    which is the place it was installed. Version is

    Python 3.9.5

    #29406
    Windell Oskay
    Keymaster

    Try opening a terminal, and in it launch python:

    python3

    Then, try

    import lxml

    #29407
    Dr. Ricky
    Participant

    So far, still inside the python environment. No error.

    #29408
    Windell Oskay
    Keymaster

    Then try
    from lxml import etree

    #29409
    Dr. Ricky
    Participant

    I get the error

    File “<stdin>”, line 1, in <module>
    ImportError: cannot import name ‘etree’ from ‘lxml’ (/opt/lib/python3.9/site-packages/lxml/__init__.py)

    #29410
    Dr. Ricky
    Participant

    Seems to be a pretty common error among a lot of python programs that use lxml.

    #29411
    Windell Oskay
    Keymaster

    Pretty rare in practice– just means that it isn’t installed correctly.

    OS/version/architecture? And, is this macports?

    In a new terminal, try python3 -m pip list | grep lxml

    #29412
    Dr. Ricky
    Participant

    No, this is on intel on QNAP, from a package manager entware.net. Basically a version of Linux. I can run Docker images on it, but would have trouble passing the USB port to it.

    #29413
    Dr. Ricky
    Participant

    lxml 4.6.3

    also

    axidrawinternal 2.7.4

    :)

    #29414
    Windell Oskay
    Keymaster

    Well, there’s one that we’ve never come across before. Some searches show other cases of this issue on that platform.

    There is some general advice about lxml installation here:

    https://lxml.de/installation.html

    Depending on what’s available through your package manager, you might try installing python3-lxml or possibly libxml2-dev libxslt-dev python-dev, and see if any of those help.

    #29428
    alanwats
    Participant

    No, it’s on Intel from entware.net, a package manager on QNAP. Basically a version of Linux. I can run docker images on it, but will have trouble passing the usb port to it.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.