-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Labels
bugSomething isn't workingSomething isn't workingglibcRelated to linking against glibcRelated to linking against glibclinkerRelated to linking (ld, ld.so or dyld)Related to linking (ld, ld.so or dyld)linuxLinux systemsLinux systemspythonSupport for Python, pip, Poetry, etc.Support for Python, pip, Poetry, etc.
Description
Current Behavior (bug)
When using python packages like gradio
the package fails when calling into pandas
.
Steps:
> devbox shell
> gradio
Error Message
> gradio
Traceback (most recent call last):
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/bin/gradio", line 5, in <module>
from gradio.reload import run_in_reload_mode
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module>
import gradio.components as components
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/gradio/components.py", line 21, in <module>
import altair as alt
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/altair/__init__.py", line 4, in <module>
from .vegalite import *
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/altair/vegalite/__init__.py", line 2, in <module>
from .v4 import *
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/altair/vegalite/v4/__init__.py", line 2, in <module>
from .schema import *
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/altair/vegalite/v4/schema/__init__.py", line 2, in <module>
from .core import *
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/altair/vegalite/v4/schema/core.py", line 4, in <module>
from altair.utils.schemapi import SchemaBase, Undefined, _subclasses
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/altair/utils/__init__.py", line 1, in <module>
from .core import (
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/altair/utils/core.py", line 14, in <module>
import pandas as pd
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/pandas/__init__.py", line 48, in <module>
from pandas.core.api import (
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/pandas/core/api.py", line 47, in <module>
from pandas.core.groupby import (
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
from pandas.core.groupby.generic import (
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/pandas/core/groupby/generic.py", line 76, in <module>
from pandas.core.frame import DataFrame
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/pandas/core/frame.py", line 172, in <module>
from pandas.core.generic import NDFrame
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/pandas/core/generic.py", line 169, in <module>
from pandas.core.window import (
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/pandas/core/window/__init__.py", line 1, in <module>
from pandas.core.window.ewm import (
File "/home/stephen/code/poc/.devbox/virtenv/python310Packages.pip/.venv/lib/python3.10/site-packages/pandas/core/window/ewm.py", line 15, in <module>
import pandas._libs.window.aggregations as window_aggregations
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
Expected Behavior (fix)
Running gradio
from devbox shell
should not return this error.
This exact error message is listed as a quirk in Nix docs: https://nixos.wiki/wiki/Packaging/Quirks_and_Caveats#ImportError:_libstdc.2B.2B.so.6:_cannot_open_shared_object_file:_No_such_file
Additional context
machine: Windows 10 running Ubuntu WSL2
version: 0.4.1
./devbox.json
:
{
"packages": [
"python310",
"python310Packages.pip"
],
"shell": {
"init_hook": [
"source $VENV_DIR/bin/activate",
"pip install -r requirements.txt"
]
},
"nixpkgs": {
"commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62"
}
}
./requirements.txt
:
fastapi
gradio
requests
ruff
Note:
This bug is reproducible with pip
and poetry
. Based devbox.json
on example repos from docs.
Workaround
- Manually add pandas:
devbox add python310Packages.pandas
- Refresh shell
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingglibcRelated to linking against glibcRelated to linking against glibclinkerRelated to linking (ld, ld.so or dyld)Related to linking (ld, ld.so or dyld)linuxLinux systemsLinux systemspythonSupport for Python, pip, Poetry, etc.Support for Python, pip, Poetry, etc.