Doriandarko / claude-engineer

Claude Engineer is an interactive command-line interface (CLI) that leverages the power of Anthropic's Claude-3.5-Sonnet model to assist with software development tasks. This tool combines the capabilities of a large language model with practical file system operations and web search functionality.
9.42k stars 1k forks source link

ModuleNotFoundError: No module named 'prompt_toolkit' #130

Closed wooter closed 3 months ago

wooter commented 3 months ago

With the current version I got this error:

Traceback (most recent call last):
  File "/Users/wouterhermans/claude-engineer/main.py", line 18, in <module>
    from prompt_toolkit import PromptSession
ModuleNotFoundError: No module named 'prompt_toolkit'

This was fixed by pip install -U jupyter_console

Maybe it needs to be included in requirements.txt?

humblemuzzu commented 3 months ago

I had the same issue and I'm not a dev so I inputted it in Claude and it gave me an awesome way to solve it:

  1. Get in the correct directory

  2. Activate the virtual environment

  3. Install 'prompt_toolkit' and update the 'requirements.txt' file:

    pip install prompt_toolkit
    pip freeze > requirements.txt
  4. Make sure all required packages are installed:

    pip install -r requirements.txt
  5. Instead of modifying the .env file, let's create a small shell script to help you start the project easily. Create a new file named start_claude.sh:

    echo '#!/bin/bash
    source claude_env/bin/activate
    python main.py' > start_claude.sh
  6. Make the script executable:

    chmod +x start_claude.sh

Now, whenever you want to use Clade Engineer just navigate to the project directory and use: ./start_claude.sh

It's working well for me and I also don't have to activate and deactivate the virtual environment again and again :)

Doriandarko commented 3 months ago

Yeah forgot to add it in the requirements should be fixed now