GitHub user justincui closed a discussion: the pyfury demo code shown in the 
website doesn't work with pyfury :(

The following demo code shown in the Fury website cannot be run with 
pyfury==0.4.1 (the latest):
```
from typing import Dict
import pyfury

class SomeClass:
    f1: "SomeClass"
    f2: Dict[str, str]
    f3: Dict[str, str]

fury = pyfury.Fury(ref_tracking=True)
fury.register_class(SomeClass)
obj = SomeClass()
obj.f2 = {"k1": "v1", "k2": "v2"}
obj.f1, obj.f3 = obj, obj.f2
data = fury.serialize(obj)
# bytes can be data serialized by other languages.
print(fury.deserialize(data))
```
Environment: 
`RHEL9.2 (5.14.0-284.25.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC )`
`python 3.9.16`

Steps to reproduce:
```
1.  python3 -m venv .venv
2.  source .venv/bin/activate
3.  pip install --upgrade pip
4.  pip install pyfury
5.  python a.py  # the demo code
```
It prints the following error:
```
/data/try_fury/.venv/lib64/python3.9/site-packages/pyfury/__init__.py:67: 
RuntimeWarning: Fury format initialization failed, please ensure pyarrow is 
installed with version which fury is compiled with: No module named 'pyarrow'
  from pyfury.format import *  # noqa: F401,F403 # pylint: disable=unused-import
Segmentation fault (core dumped)
```
According to the error message, I install the pyarrow. I try the following
`pip intall pyarrow`
`pip install pyarrow==14.0.0 # according to README in fury.python`
`pip install pyarrow==12.0.0 # according to setup.py in fury/python` 
None works.

In the error message, it complains the numpy 2.0.0 is incompatible. I install 
numpy with `pip install numpy==1.26.4`
```
>>> pip list
Package     Version
----------- -------
cloudpickle 3.0.0
numpy       1.26.4
pip         24.1.1
pyarrow     12.0.0
pyfury      0.4.1
setuptools  53.0.0
>>> python a.py
/data/try_fury/.venv/lib64/python3.9/site-packages/pyfury/__init__.py:67: 
RuntimeWarning: Fury format initialization failed, please ensure pyarrow is 
installed with version which fury is compiled with: libarrow.so.1400: cannot 
open shared object file: No such file or directory
  from pyfury.format import *  # noqa: F401,F403 # pylint: disable=unused-import
Segmentation fault (core dumped)
```



GitHub link: https://github.com/apache/fory/discussions/1719

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to