You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Trying to port a Python project into Julia. Julia's Transformers.jl library, however, doesn't seem to support HuggingFace pipelines, so I'm turning to PythonCall in order to use the Python package transformers. I can import it ok with transformers = pyimport("transformers"), but I get the following error when trying to actually call transformers.pipeline:
julia> pos = transformers.pipeline("token-classification", model="PlanTL-GOB-ES/roberta-large-bne-capitel-pos")
ERROR: Python: RuntimeError: Failed to import transformers.pipelines because of the following error (look up to see its traceback):
/home/dijkie/packages/julias/julia-1.8/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/dijkie/miniconda3/envs/ds/lib/python3.10/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-310-x86_64-linux-gnu.so)
Python stacktrace:
[1] _get_module
@ transformers.file_utils ~/miniconda3/envs/ds/lib/python3.10/site-packages/transformers/file_utils.py:2779
[2] __getattr__
@ transformers.file_utils ~/miniconda3/envs/ds/lib/python3.10/site-packages/transformers/file_utils.py:2767
Stacktrace:
[1] pythrow()
@ PythonCall ~/.julia/packages/PythonCall/eU0yr/src/err.jl:94
[2] errcheck
@ ~/.julia/packages/PythonCall/eU0yr/src/err.jl:10 [inlined]
[3] pygetattr(x::Py, k::String)
@ PythonCall ~/.julia/packages/PythonCall/eU0yr/src/abstract/object.jl:60
[4] getproperty(x::Py, k::Symbol)
@ PythonCall ~/.julia/packages/PythonCall/eU0yr/src/Py.jl:272
[5] top-level scope
@ REPL[7]:1
So, there seems to be a problem with GLIBCXX_3.4.30 which I cannot decipher, much less correct.
Any ideas?
The text was updated successfully, but these errors were encountered:
I thought I fixed this a while ago. Can you try upgrading?
Thank you for your quick reply!
What should I upgrade, and how?
I'm using Julia v. 1.8 and Python v. 3.10. Just installed PythonCall with ] add PythonCall a couple of hours ago...
If you haven't configured anything, then PythonCall should automatically install a version of glibcxx compatible with Julia. Are you setting any env vars to do with PythonCall or CondaPkg?
Thank you again for taking the time to reply. Yes, I'musing PythonCall ENV["JULIA_CONDAPKG_BACKEND"] = "Current" to use my usual NLP environment. I ended up copying my system's libstdc++.so.6 to the Julia folder which includes the most up-to-date version of GLIBCXX and it worked. Kinda hacky though...
Hi! Trying to port a Python project into Julia. Julia's
Transformers.jl
library, however, doesn't seem to support HuggingFace pipelines, so I'm turning to PythonCall in order to use the Python packagetransformers
. I can import it ok withtransformers = pyimport("transformers")
, but I get the following error when trying to actually calltransformers.pipeline
:So, there seems to be a problem with
GLIBCXX_3.4.30
which I cannot decipher, much less correct.Any ideas?
The text was updated successfully, but these errors were encountered: