Search code examples
pythongoogle-colaboratorypython-poetrylanggraph

Poetry init in Google Colab is running for hour


I'm trying to run langgraph using my Google Colab. So I used following command to install poetry in my Google Colab.

from google.colab import drive
drive.mount('/content/gdrive')
# Move in your Drive
%cd /content/gdrive/MyDrive/
# Create and move in the new project directory
!rm -rf reflection-agent
!mkdir reflection-agent
%cd reflection-agent
!pip install poetry
# Configure poetry to create virtual environments in the project folder
!poetry config virtualenvs.in-project true

But while trying to create pyproject.toml file in my directory reflection-agent, My following command !poetry init running for hours without creating pyproject.toml Can you please help me to resolve this issue?


Solution

  • It could be that there is some interactivity happening with some of the operations (asking Y/N question) and you do not see this. Because there is no terminal accessible for you, you cannot enter to the prompt to response the interactive query.

    Try running:

    poetry init --no-interaction