AttributeError: module 'os' has no attribute 'add_dll_directory' when importing "pandas" library

Jose Angel Riveaux 0 Puntos de reputación
2023-11-22T18:39:57.5266667+00:00

I'm endeavoring to deploy an Azure Function application that relies on various libraries, including numpy, torch, and pandas (you can find all the prerequisites listed in the attached image). While the application runs smoothly on my Ubuntu 22.0.4 laptop, I encounter a persistent issue upon deployment to the remote Azure Function. Specifically, I keep receiving the following error: "AttributeError: module 'os' has no attribute 'add_dll_directory'." I've provided an image displaying these errors for your reference.

In my attempts to resolve this issue, I explored several solutions available online, such as those outlined in https://github.com/confluentinc/confluent-kafka-python/issues/1462 and https://stackoverflow.com/questions/77244413/azure-function-app-error-attributeerror-module-os-has-no-attribute-add-dll, yet none have proven effective thus far. Additionally, I verified that the init.py file within my local pandas installation does not include a line invoking _delvewheel_patch_1_5_1(). Consequently, I suspect that the problem might stem from using an incorrect version of pandas intended for Windows rather than Linux.3cc8570c-8473-4294-9b1e-181bd4c73e18

"I am grateful for any solution suggestions that could assist me.

Azure
Azure
Plataforma e infraestructura de informática en la nube para crear, implementar y administrar aplicaciones y servicios a través de una red mundial de centros de datos administrados por Microsoft.
435 preguntas
0 comentarios No hay comentarios
{count} votos

Su respuesta

Las respuestas se pueden marcar como respuestas aceptadas por el autor de la pregunta, lo que ayuda a los usuarios a conocer la respuesta que resolvió el problema del autor.