Importing after Installing
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
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.
I am getting hit with the "installing with wheel" thing too. Im trying to use psycopg2-binary.
My suggestion would be pre-installing these required packages for now manually, and when our fix is ready, this would not be a problem.
@javadan @chr1s3sw0rthy A PR was merged to fix this issue and please try again if "installing with wheel" would succeed.
Close as it has been fixed.