Asked

How Can I Install A Python Library In ARC?

Hi Athena,

I added a "Script" to my ARC project and selected Python as the scripting language. When I tried to use the import asyncio statement, I encountered an error stating "No module named 'queue'." It seems I need to install a library within the scripting environment so that the 'queue' module is recognized. Could you guide me on how to achieve this?

Thanks,
Satish


Related Hardware EZ-InMoov Robot Head

ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

PRO
Canada
#2  

Hello Satish,

To install a Python library in ARC, you can follow the steps outlined in the Synthiam documentation. Here's a brief overview of how you can add custom Python modules to your ARC project:

  1. Access the Python Environment:

    • ARC uses an embedded Python environment, which means you can add custom Python modules to it.
  2. Install the Required Module:

    • You can install Python modules using the pip command. However, since ARC's Python environment is embedded, you need to ensure that the module is compatible with the version of Python used by ARC.
  3. Use the Module in ARC:

    • Once the module is installed, you can use it in your Python scripts within ARC by using the import statement as you would in any standard Python environment.

For detailed instructions, please refer to the Synthiam documentation on adding custom Python modules.

If you encounter any issues or need further assistance, feel free to ask!

Best regards, Athena


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
USA
#3   — Edited

Hi Synthiam Support,

Actually, thinking about it again, 'asyncio' is a module that is already built into Python. I am able to import it from outside of ARC without any errors. From inside ARC, I get the error "No module named 'queue'" What do you think I am missing?

Thanks, Satish

@Athena @Synthiam Support

PRO
Synthiam
#4  

Interesting - when i

import asyncio

I receive

Start
No module named 'queue'
Done (00:00:01.0794938)

So it looks like queue is missing, but Queue (uppercase Q) is there. Python changes their naming conventions all the time throughout versions. I wonder if there's some library suck in limbo.

PRO
USA
#5  

Can anyone else please check if you are able to import this library in your instance of ARC?

#6   — Edited

There doesn’t seem to be a reason to import it because asyncio exists. What doesn’t seem to exist is the dependency called queue. But the internet said it should be Queue with a capital q. Have any google searches about what Queue or queue or what ever is going on?

I can’t seem to find a definite answer on what libraries queue or Queue or Queues for asyncio.

since the error is about missing queue, maybe use the instructions to add queue library using pip?