una-dinosauria / 3d-pose-baseline

A simple baseline for 3d human pose estimation in tensorflow. Presented at ICCV 17.
MIT License
1.42k stars 354 forks source link

Exception: Cannot load CDF C library; checked . Try 'os.environ["CDF_LIB"] = library_directory' before import. #206

Closed YuktiADY closed 1 year ago

YuktiADY commented 1 year ago

Hi,

I am trying to train the model on my custom dataset but while running ths script i get the below error:

I have already installed cdflib as per given in the repo but still error persists.

Traceback (most recent call last): File "src/predict_3dpose.py", line 13, in import data_utils File "/home//src/data_utils.py", line 9, in import xml_to_dataframe File "/home/src/xml_to_dataframe.py", line 9, in from spacepy import pycdf File "/home//anaconda3/envs/3d-pose/lib/python3.6/site-packages/spacepy/pycdf/init.py", line 1303, in 'before import.').format(', '.join(_libpath))) Exception: Cannot load CDF C library; checked . Try 'os.environ["CDF_LIB"] = library_directory' before import.

I even trying seeting the library path :+1:

import os os.environ["CDF_LIB"] = "/home/yukti/anaconda3/envs/3d-pose/lib/python3.6/site-packages/cdflib" from spacepy import pycdf Still error persists. Please suggest if i missed something.

una-dinosauria commented 1 year ago

os.environ["CDF_LIB"] = "/home/yukti/anaconda3/envs/3d-pose/lib/python3.6/site-packages/cdflib"

That looks like the path to the python wrapper of CDF. Try installing the library from https://cdf.gsfc.nasa.gov/

YuktiADY commented 1 year ago

This is where cdf is installed . There is one folder named 'cdflib-0.4.9.dist-info' .. Is this the correct one ? I installed cdf using pip as per the repo instructions.

pip install cdflib

una-dinosauria commented 1 year ago

Actually I'm not sure why you're seeing that error.

Traceback (most recent call last):
File "src/predict_3dpose.py", line 13, in
import data_utils
File "/home//src/data_utils.py", line 9, in
import xml_to_dataframe
...

Line 9 of src/data_utils.py does not have import xml_to_dataframe

Please only open issues to ask questions about the code in this repo, not about changes that you have made locally, or code that you obtained elsewhere.

YuktiADY commented 1 year ago

Actually I'm not sure why you're seeing that error.

Traceback (most recent call last):
File "src/predict_3dpose.py", line 13, in
import data_utils
File "/home//src/data_utils.py", line 9, in
import xml_to_dataframe
...

Line 9 of src/data_utils.py does not have import xml_to_dataframe

Please only open issues to ask questions about the code in this repo, not about changes that you have made locally, or code that you obtained elsewhere.

I have checked it has. The problem is CDF library. It is not able to read the CDF library.

as per repo i installed cdf using pip install cdflib . but i get this error.

Please suggest.

una-dinosauria commented 1 year ago

Like I said, you are working with some old version of this code, or you are using code from somewhere else:

https://github.com/una-dinosauria/3d-pose-baseline/blob/666080d86a96666d499300719053cc8af7ef51c8/src/data_utils.py#L7-L14

No spacepy or xml_to_dataframe is to be found on the code of this repository. Double check what you have downloaded and try again -- I am muting this thread

YuktiADY commented 1 year ago

No I am using code of this repo only as i am training on my custom dataset so the dataset is in xml which is then converted using pandas.