Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLM 0.13 broken on Windows #407

Closed
simonw opened this issue Jan 26, 2024 · 7 comments
Closed

LLM 0.13 broken on Windows #407

simonw opened this issue Jan 26, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@simonw
Copy link
Owner

simonw commented Jan 26, 2024

Reported here: https://discord.com/channels/823971286308356157/1128504153841336370/1200590104276783217

> llm
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\tools\aug\scripts\llm.exe__main__.py", line 4, in <module>
  File "C:\tools\aug\Lib\site-packages\llm\cli.py", line 31, in <module>
    import readline
ModuleNotFoundError: No module named 'readline'
@simonw simonw added the bug Something isn't working label Jan 26, 2024
@simonw
Copy link
Owner Author

simonw commented Jan 26, 2024

pip install pyreadline3 seems to fix it.

@simonw
Copy link
Owner Author

simonw commented Jan 27, 2024

I really need to figure out a good Windows dev environment for myself.

For the moment can I at least get CI running on Windows?

@simonw
Copy link
Owner Author

simonw commented Jan 27, 2024

Windows CI failed with that same error: https://github.com/simonw/llm/actions/runs/7674731683/job/20919846177

CleanShot 2024-01-26 at 16 02 47@2x

@simonw
Copy link
Owner Author

simonw commented Jan 27, 2024

Doing the rest of the work in PR:

simonw added a commit that referenced this issue Jan 27, 2024
* Run CI on Windows and macOS as well as Ubuntu, refs #407
* Use pyreadline3 on win32
* Back to fail-fast since we have a bigger matrix now
* Mark some tests as xfail on windows
@simonw
Copy link
Owner Author

simonw commented Jan 27, 2024

@simonw simonw closed this as completed Jan 27, 2024
@rsbohn
Copy link

rsbohn commented Jan 27, 2024

Thanks for the fast turn-around. Working great now!

@dance2die
Copy link

dance2die commented Apr 30, 2024

I was using conda venv, and the fix was to install pydantic using conda.exe

conda install pydantic -c conda-forge

From https://docs.pydantic.dev/latest/install/

because my llm instance was haivng an issue was pydantic instead of readline.
Posted here as this issue kept on popping up on google search for me
& and to help others.

(base) C:\Users\dance2die>llm
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\dance2die\anaconda3\Scripts\llm.exe\__main__.py", line 4, in <module>
  File "C:\Users\dance2die\anaconda3\Lib\site-packages\llm\__init__.py", line 18, in <module>
    from .plugins import pm
  File "C:\Users\dance2die\anaconda3\Lib\site-packages\llm\plugins.py", line 17, in <module>
    pm.load_setuptools_entrypoints("llm")
  File "C:\Users\dance2die\anaconda3\Lib\site-packages\pluggy\_manager.py", line 287, in load_setuptools_entrypoints
    plugin = ep.load()
             ^^^^^^^^^
  File "C:\Users\dance2die\anaconda3\Lib\importlib\metadata\__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\dance2die\anaconda3\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\dance2die\anaconda3\Lib\site-packages\llm_claude\__init__.py", line 6, in <module>
    from pydantic import Field, field_validator
ImportError: cannot import name 'field_validator' from 'pydantic' (C:\Users\dance2die\anaconda3\Lib\site-packages\pydantic\__init__.cp311-win_amd64.pyd)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants