Import pyodbc error on rasa server deployment


Everything is working properly on Rasa local. However, when i try to deploy the same code on Rasa server, i m having a headache: one of the examples is getting import pyodbc error while it’s already installed as u can see at the end:

[root@localhost ~]# kubectl get pods --namespace rasa NAME READY STATUS RESTARTS AGE rasa-redis-master-0 1/1 Running 0 21m rasa-app-796d8cb5d7-bxh8j 1/1 Running 0 21m rasa-nginx-55d4f96567-qkmnz 1/1 Running 0 21m rasa-postgresql-0 1/1 Running 0 21m rasa-db-migration-service-0 1/1 Running 0 21m rasa-rasa-worker-54756999b7-pvxz5 1/1 Running 0 9m23s rasa-rasa-production-6c644c7b54-8nmvp 1/1 Running 0 9m23s rasa-rasa-x-6b78686797-5rqs4 1/1 Running 0 9m18s rasa-rabbit-0 1/1 Running 0 9m8s rasa-event-service-d84f65767-scx7l 1/1 Running 1 21m rasa-app-55bd447d6-n9bnx 0/1 CrashLoopBackOff 6 9m23s

[root@localhost ~]# kubectl logs rasa-app-55bd447d6-n9bnx --namespace=rasa 2021-06-23 16:39:10 INFO rasa_sdk.endpoint - Starting action endpoint server… 2021-06-23 16:39:10 ERROR rasa_sdk.executor - Failed to register package ‘actions’. Traceback (most recent call last): File “/app/rasa_sdk/”, line 262, in register_package self._import_submodules(package) File “/app/rasa_sdk/”, line 225, in _import_submodules self._import_module(full_name) File “/app/rasa_sdk/”, line 239, in _import_module module = importlib.import_module(name) File “/usr/local/lib/python3.7/importlib/”, line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “”, line 1006, in _gcd_import File “”, line 983, in _find_and_load File “”, line 967, in _find_and_load_unlocked File “”, line 677, in _load_unlocked File “”, line 728, in exec_module File “”, line 219, in _call_with_frames_removed File “/app/actions/”, line 1, in import requests, googlesearch, mysql.connector, pycountry, json, random, time, datetime, os, pyodbc, smtplib, ssl ModuleNotFoundError: No module named ‘pyodbc’

[root@localhost ~]# pip3.9 install pyodbc Requirement already satisfied: pyodbc in /usr/local/lib/python3.9/site-packages (4.0.30) WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: