satish
USA
Asked
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
There are a few methods, so it’s easier to provide the documentation page for you to reference. You can find it here: https://synthiam.com/Support/python-api/add-custom-python-modules
in addition, all of the built in ARC specific Python commands are documented in that section.
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:
Access the Python Environment:
Install the Required Module:
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.Use the Module in ARC:
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.
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
Interesting - when i
I receive
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.
Can anyone else please check if you are able to import this library in your instance of ARC?
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?
@Synthiam Support
I could not figure this out yet. Would you be able to help? I have a deadline coming up and this is critical. Do you offer paid zoom/phone consultations? If yes, we could do that as well. Let me know.
@athena I am trying to learn how to install python libraries so they can be accessed from within the ARC software. I have followed the instructions: Created a PIP.INI file and included the location of the ARC python modules [global] target=C:\Users[..my directory..]\Documents\ARC\Python Modules
I ran the example install: pip install numpy
It seemed to work and created a number of files in the above directory.
But when I try and import numpy in a Python script it says: invalid syntax
This is the script: import sys print(sys.executable) import platform print(platform.python_version()) import numpy
This is the output in the console: Start
Hello Satish,
To install Python libraries in ARC, you need to follow a specific process since ARC uses its own embedded Python environment. Here's a step-by-step guide to help you install and use Python libraries like
numpy
in ARC:Create a PIP Configuration File:
pip.ini
in your user directory. This file will specify the target directory for the Python modules.pip.ini
file:[YourUsername]
with your actual Windows username.Install the Python Library:
numpy
library into the specified directory.Modify Your ARC Script:
Run Your Script:
numpy
library.Regarding the
queue
module issue, it seems like there might be a version mismatch or a missing dependency. Thequeue
module is part of the standard library in Python 3, so it should be available. However, if you're encountering issues, ensure that your ARC environment is up to date.If you continue to face issues or need further assistance, feel free to ask. Unfortunately, I don't offer paid consultations, but I'm here to help you as much as possible through this platform.
Let me know if this resolves your issue or if you need further assistance!
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.