Code fails to when deployed but works fine in development

I’m constantly getting this error when trying to deploy my Fastapi server.

ImportError: /nix/store/dg8mpqqykmw9c7l0bgzzb5znkymlbfjw-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/dg8mpqqykmw9c7l0bgzzb5znkymlbfjw-glibc-2.37-8/lib/libstdc++.so.6)

I tried to troubleshoot it by following the recommendations here but no luck so far.

Full log:

03/06/24 04:17:01 AM
File "/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/lib/python3.10/asyncio/runners.py", line 44, in run
03/06/24 04:17:01 AM
server.run()
03/06/24 04:17:01 AM
File "/home/runner/f2ccfc2e-1ed6-4aa8-961c-3c4049f7a358/main.py", line 23, in <module>
03/06/24 04:17:01 AM
Traceback (most recent call last):
03/06/24 04:17:01 AM
import pandas._libs.window.aggregations as window_aggregations
03/06/24 04:17:01 AM
File "/home/runner/f2ccfc2e-1ed6-4aa8-961c-3c4049f7a358/.pythonlibs/lib/python3.10/site-packages/pandas/core/window/__init__.py", line 1, in <module>
03/06/24 04:17:01 AM
from pandas.core.generic import (
03/06/24 04:17:01 AM
from pandas.core.frame import DataFrame
03/06/24 04:17:01 AM
from pandas.core.groupby import (
03/06/24 04:17:01 AM
File "/home/runner/f2ccfc2e-1ed6-4aa8-961c-3c4049f7a358/.pythonlibs/lib/python3.10/site-packages/pandas/__init__.py", line 49, in <module>
03/06/24 04:17:01 AM
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
03/06/24 04:17:01 AM
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
03/06/24 04:17:01 AM
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
03/06/24 04:17:01 AM
File "/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/lib/python3.10/importlib/__init__.py", line 126, in import_module
03/06/24 04:17:01 AM
module = importlib.import_module(module_str)
03/06/24 04:17:01 AM
config.load()
03/06/24 04:17:01 AM
return loop.run_until_complete(main)
03/06/24 04:17:01 AM
File "/home/runner/f2ccfc2e-1ed6-4aa8-961c-3c4049f7a358/.pythonlibs/lib/python3.10/site-packages/uvicorn/server.py", line 62, in run
03/06/24 04:16:51 AM
forwarding local port 8000 to external port 1104

.replit file

entrypoint = "main.py"
modules = ["python-with-prybar-3.10:v2-20230925-77b13e4"]

hidden = [".pythonlibs"]
disableGuessImports = true

[nix]
channel = "stable-23_05"

[deployment]
run = ["python3", "main.py"]
deploymentTarget = "cloudrun"

[languages]

[languages.python3]
pattern = "**/*.py"

[languages.python3.languageServer]
start = "pylsp"

[[ports]]
localPort = 8000
externalPort = 80

replit.nix file

{pkgs}: {
  deps = [
    pkgs.glibcLocales
    pkgs.postgresql
    pkgs.openssl
  ];
}
1 Like

Having the same issue. Did you find a solution? @mailavinashsah

ended up creating a new project, then copied everything from replit.nix of new project to the old one and everything workedout