prodigy not starting in AWS Sagemaker Jupyter Lab

After following the instructions for installation in a JupyterLab terminal, I checked to make sure the extension was installed, which it was, then I searched the command tab for prodigy and nothing came up. Following the site instructions, I tried prefacing
prodigy ner.correct example_dataset en_core_web_md ./news_headlines.jsonl --label ORG,PERSON,PRODUCT with !python -m in the notebook cell, but got this same error.

/usr/bin/python: No module named prodigy

I tried out the example jupyter notebook, but that doesn't seem to be working either, for different reasons.

This was when trying to run the example code. I tried copying code from the installation guide as well and it didn't work.

Hi @maxgraze ,

Based from your screenshot, I think that you should prefix all your terminal commands with !, that's why you're having a syntax error.

For the "no module named" error, I suspect that the python environment where prodigy was installed is different from what Jupyter sees. Ideally we'd want them to be the same. Perhaps you can try using python3 instead of python? I'm not sure if Sagemaker delineates between the two.

Thanks for your response! I tried using an exclamation point as well, but get this error:
/bin/bash: prodigy: command not found

Sagemaker doesn't differentiate between the two I believe.

I see, to be clear, have you already tried the following?

# Run this in a Jupyter notebook cell
!python3 -m prodigy
!python -m prodigy

For completeness sake, you might also try installing prodigy within the Jupyter notebook. Something like

# Run this in a Jupyter notebook cell
!pip install prodigy ...

Yes for the first too I get the same error, and in the second one I getL

  ERROR: Cannot unpack file /tmp/pip-unpack-url7yk9w/download.prodi.gy (downloaded from /tmp/pip-req-build-b_85obx0, content-type: application/json); cannot detect archive format
ERROR: Cannot determine archive format of /tmp/pip-req-build-b_85obx0

when I put in my password using this

!pip install prodigy -f https://XXXXXXXXXXXXXXXX@download.prodi.gy

I'm not sure why this post got tagged as "solved" either.

The XXX here should be the license key that you received after purchasing Prodigy. Maybe double-check that this is correct?

(Btw, I also recognised your name and if I'm not mistaken, you're currently on a VM trial? In that case, you can test Prodigy on the VM we provide, not install it on an external server. For this, you will need your own Prodigy license.)

Yes I am on a VM trial. I have been trying to use the jupyter notebook example I got, but I'm getting these same errors.

In terms of the annotation server that was set up, I get "Bad Gateway" when I try to access it.

If you're on a trial VM, you can access Prodigy pre-installed on the VM, but you can't install it on your own machine yet because you don't yet have a license.

Are you running the annotation server before accessing the UI? The server needs to run and then you should be able to access the app via the link provided in the instructions.

Sorry I meant installing prodigy - maybe I am confused about how to use the trial. I thought using the jupyter notebook link would be the fastest, but as I mentioned, I haven't been able to get it to run. In terms of getting the VM to work, I t

Hi! I just saw your email and it looks like there might be a problem with JupyterLab detecting the virtual environment. It should work if you're using the "Terminal" in JupyterLab and type in the command :slightly_smiling_face:

Alternatively, you can also use !/home/prodigy/pgy-env/bin/python -m prodigy in the Jupyter notebook. Sorry for the inconvenience, I don't know what went wrong in JupterLab here!