Python Forum
ImportError: Can not find the shared library: libhdfs3.so
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ImportError: Can not find the shared library: libhdfs3.so
#1
I am developing Hadoop File System client with python module hdfs3. My OS is CentOS 8 and IDE is eclipse. First I try to install hdfs3 with conda install command.


# conda config --add channels conda-forge
# conda config --set channel_priority strict
# conda install hdfs3


But the installation is failed. The Conda installation command can not download the package. So I use pip installation.

# pip install hdfs3


The pip installation is successful, but the python codes throw errors

from hdfs3 import HDFileSystem
hdfs = HDFileSystem(host='localhost', port=8020)
The errors are shown below,

Error:
Traceback (most recent call last): File "/home/jhwang/eclipse-workspace/BigDataPythonTest/com/aaa/etl/hdfs3-test.py", line 7, in <module> hdfs = HDFileSystem(host='localhost', port=8020) File "/usr/python/anaconda3/lib/python3.8/site-packages/hdfs3/core.py", line 88, in __init__ self.connect() File "/usr/python/anaconda3/lib/python3.8/site-packages/hdfs3/core.py", line 106, in connect get_lib() File "/usr/python/anaconda3/lib/python3.8/site-packages/hdfs3/core.py", line 670, in get_lib from .lib import _lib as l File "/usr/python/anaconda3/lib/python3.8/site-packages/hdfs3/lib.py", line 24, in <module> raise ImportError("Can not find the shared library: libhdfs3.so\n" ImportError: Can not find the shared library: libhdfs3.so
How can I download hdfs3 and libhdfs3 modules with conda install command? Any reply will be deeply thankful.
Reply
#2
https://hdfs3.readthedocs.io/en/latest/install.html shows an alternate conda command for installation (in case that was why yours failed), and it shows that if you don't use conda, you need to install the libhdfs.so file via an OS package.

Finally, there's also a note that that project isn't being developed any longer, and if you have trouble, you might want to examine PyArrow's HDFS interface.
aupres likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to find I2C library in Python Joni_Engr 1 1,775 Oct-08-2021, 04:06 PM
Last Post: Larz60+
  Python can't find a library which is definitely there! Pedroski55 1 9,667 Mar-26-2021, 11:44 PM
Last Post: snippsat
  Can Embedded Python run any shared library on Android ? sprotz 0 2,309 Nov-08-2020, 12:21 PM
Last Post: sprotz
  Shared reference of variables... Denial 1 1,409 Aug-29-2020, 01:52 PM
Last Post: snippsat
  How to install and use a shared libary, via a .dll? ninjaisfast 0 1,293 Jul-09-2020, 03:23 PM
Last Post: ninjaisfast
  Calling Extended Embedding Python as shared library jibarra 0 2,214 Jul-19-2019, 05:22 PM
Last Post: jibarra
  Divisors shared the second numbers mircea_dragu 1 2,038 Feb-07-2019, 10:09 PM
Last Post: ichabod801
  running just one process shared among uses Skaperen 3 2,984 Aug-07-2018, 12:12 AM
Last Post: Skaperen
  Shared reference and equality zyo 3 3,150 Jun-30-2018, 07:10 PM
Last Post: ljmetzger
  Shared queues l00p1n6 3 2,979 May-15-2018, 01:38 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020