handprint icon indicating copy to clipboard operation
handprint copied to clipboard

Use in google colab?

Open Nestak2 opened this issue 3 years ago • 1 comments

Thanks for making this code public! I am trying to use it in google colab, but after the pip installation in colab I receive dependency warnings. When I then try to run

!handprint -l

I get the error message:

Traceback (most recent call last):
  File "/usr/local/bin/handprint", line 5, in <module>
    from handprint.__main__ import console_scripts_main
  File "/usr/local/lib/python3.7/dist-packages/handprint/__main__.py", line 46, in <module>
    from sidetrack import set_debug, log, logr
ImportError: cannot import name 'logr' from 'sidetrack' (/usr/local/lib/python3.7/dist-packages/sidetrack/__init__.py)

A similar error message appears when I try !python3 -m handprint -h.

So is there a way to run handprint on google colab? Is there some explanatory colab notebook available? Am I missing maybe some installation/initialization steps? Do you plan to make handprint also workable for colab? Thanks

Nestak2 avatar Aug 27 '21 15:08 Nestak2

I'm sorry this issue sat unanswered for so long. This problem occurred before Handprint 1.5.3, if the copy of Sidetrack was newer than what Handprint was written to use (which was 1.4.0). To compound the problem, prior to Handprint release 1.5.3, Handprint's requirements.txt file did not pin the versions of dependencies, so if you got a newer version of Sidetrack during installation, this is the error that would occur.

To fix, you can either install Sidetrack version 1.4.0 specifically, or (better) update Handprint to the latest release, which is version 1.5.4.

As far as running on Collab, I've never tried it. I'd like to try Collab at some point soon, however. Hopefully it should work with the newer version of Handprint.

mhucka avatar Sep 11 '21 03:09 mhucka