1

I'm attempting to use the Dapr python API in an Ubuntu 20.04 container. I'm building and running the container image on a Ubuntu 20.04 VM in Azure.

Attempting to import Dapr results in this error:

ImportError: cannot import name 'cygrpc' from 'grpc._cython'

Which from my research is unrelated to Dapr and pops up a lot when trying to use gRPC

I've Googled extensively and tried these fixes:

People are using 32bit python and need to use 64bit

Can confirm that my Python interpreter is 64bit:

enter image description here

Attempting to use on ARM architecture

Can confirm I'm using x86_64:

enter image description here

Also tried other suggestions such as using grpcio==1.27.2

And a lot of other answers relate to AWS which doesn't apply.

I am using an "interesting" Python runtime that's built into the Houdini 3D software package but haven't ever run into compatibility issues before.

This is my requirements.txt:

dapr == 1.5.0; python_version >= '3.7'

And this is my pip command:

pip3 install --no-input -r /usr/local/hourequirements.txt -t /opt/houdini/houdini/python3.7libs

Are there ways to further debug this issue?

Is there a guide somewhere to build gRPC on linux?

Geordie
  • 1,920
  • 2
  • 24
  • 34
  • Did you ever get a solution for this? I've got the same issue when trying to use the python bundled with LibreOffice. – timhj May 10 '23 at 02:35
  • Was a while ago but I don't think so. I ended doing the opposite approach where I got Houdini working in the system Python install so gRPC would work. – Geordie May 12 '23 at 18:26
  • Thanks - for me it turned out there were multiple python versions installed, PIP was installing required packages to one and the app I was using was trying to use a different version of python. – timhj May 17 '23 at 08:39

0 Answers0