TaskWeaver icon indicating copy to clipboard operation
TaskWeaver copied to clipboard

Importing after Installing

Open javadan opened this issue 1 year ago • 3 comments

Describe the bug

Taskweaver can install a library but then it can't import it.

I've seen this bug in the issues a few times but I don't understand the underlying issue, from the discussion.

eg. "[ShilinHe]: please make sure the package install environment is the docker"

According to the docs, 'container' mode is the default. The discussion continues suggesting that the user create their own docker image and manually specify imports in requirements.txt and rebuild. I was hoping that Taskweaver would be able to think "I need torch" and install it in the docker, and import it, and that would just work™. What is the reason it can't do this?

To Reproduce

Example: TaskWeaver ▶ I am TaskWeaver, an AI assistant. To get started, could you please enter your request? Human ▶ Do a minimal example program where all you do is install pytorch and then try to import torch

Expected behavior

Expect it to be able to import an installed package

Environment Information (please complete the following information):

  • OS: WSL
  • Python Version 3.10
  • LLM that you're using: GPT-4o

javadan avatar Sep 17 '24 18:09 javadan

TaskWeaver has the capability to install library when it needs additional packages to accomplish a certain task. Currently, there is a bug in installing packages that need to be built with wheel.

liqul avatar Sep 18 '24 02:09 liqul

I am getting hit with the "installing with wheel" thing too. Im trying to use psycopg2-binary.

chr1s3sw0rthy avatar Sep 24 '24 14:09 chr1s3sw0rthy

My suggestion would be pre-installing these required packages for now manually, and when our fix is ready, this would not be a problem.

liqul avatar Sep 27 '24 04:09 liqul

@javadan @chr1s3sw0rthy A PR was merged to fix this issue and please try again if "installing with wheel" would succeed.

liqul avatar Oct 09 '24 07:10 liqul

Close as it has been fixed.

liqul avatar Oct 18 '24 03:10 liqul