Hi, I have https://github.com/cohere-ai/cohere-terrarium downloaded and running properly. It takes my code and runs it (I am using it to automatically run LLM generated code). I want to install new packages into this system for the LLM to be able to run, but unfortunately, the reference for doing so brings me to pyodide (https://pyodide.org/en/stable/usage/loading-packages.html) which I have never used before (nor do I have downloaded) and am struggling to understand the documentation. It mentions micropip, which I don't understand how to use without pyodide. I have tried
import json
import requests
def run_code(code) -> str:
url = "http://localhost:8080"
headers = {
"Content-Type": "application/json"
}
jdata = {
"code": code
}
response = json.loads(requests.post(url, headers=headers, json=jdata).text)
print(response['std_out'])
print(response['error']['message'])
run_code("""import pyodide_js as pyodide
await pyodide.loadPackage("micropip");
import micropip
""")```
but this gives me some obscure error:
File "/lib/python3.11/site-packages/micropip/_compat_in_pyodide.py", line 7, in <module>
from pyodide.http import pyfetch
File "/lib/python311.zip/pyodide/http.py", line 9, in <module>
from js import Object
ImportError: cannot import name 'Object' from 'js' (unknown location)
Code context:
1: import pyodide_js as pyodide
2: await pyodide.loadPackage("micropip");
3: import mi```
not that I am even sure that trying to run micropip inside of cohere-terrarium makes sense in the first place.