tvst / st-annotated-text

A simple component to display annotated text in Streamlit apps.
Apache License 2.0
523 stars 41 forks source link

pip install location #4

Closed ecatkins closed 3 years ago

ecatkins commented 4 years ago

Hi, just trying out the library, seems to work great!

But for me, when installing via pypi, the library was installed as annotated_text not as st_annotated_text, so instead of the instructions in the README, I had to:

from annotated_text import annotated_text
sai-krishna-msk commented 4 years ago

yeah same for me too

opatrickchen commented 3 years ago

Experienced the same issue on my side. @tvst You might want to update the example on https://pypi.org/project/st-annotated-text/

jonas-nothnagel commented 3 years ago

same

AndreasTraut commented 3 years ago

Same for me. Instruction on README did not work for me. Correct would have been: from annotated_text import annotated_text instead of from st_annotated_text import annotated_text

gireeshkbogu commented 3 years ago

I'm also having issues. I tried both approaches mentioned here but I'm getting the following error. Any suggestions would be appreciated.

ImportError: cannot import name 'div'
Traceback:
File "/Users/gireeshbogu/miniconda2/lib/python3.6/site-packages/streamlit/script_runner.py", line 338, in _run_script
    exec(code, module.__dict__)
File "/Users/gireeshbogu/Desktop/stream/complyAlpha/app.py", line 5, in <module>
    from annotated_text import annotated_text
File "/Users/gireeshbogu/miniconda2/lib/python3.6/site-packages/annotated_text/__init__.py", line 3, in <module>
    from htbuilder import HtmlElement, div, span, styles
tvst commented 3 years ago

README updated, thanks!

ImportError: cannot import name 'div'

This is a Python version issue. This was fixed last year by @mart1nro but I forgot to make a new release. Should be fixed in yesterday's release, though!