karfly/learnable-triangulation-pytorch

preprocess the dataset:Cannot load CDF C library; checked . Try 'os.environ["CDF_LIB"] = library_directory'

Closed this issue · 1 comments

$ python process_all.py
Traceback (most recent call last):
File "process_all.py", line 4, in
from spacepy import pycdf
File "/home/chuanjiang/anaconda3/lib/python3.7/site-packages/spacepy/pycdf/init.py", line 1258, in
'before import.').format(', '.join(_libpath)))
Exception: Cannot load CDF C library; checked . Try 'os.environ["CDF_LIB"] = library_directory' before import.

I guess you are having trouble with repo . I would recommend you to check whether you installed pycdf. Even though you have your pycdf library but the same problem occurs, you can try to manually add your CDF C library path on os.environ

import os
if not "CDF_LIB" in os.environ:
    base_dir = <path-to-cdf-source-code>
    os.environ["CDF_BASE"] = base_dir
    os.environ["CDF_BIN"] = base_dir + "/bin"
    os.environ["CDF_LIB"] = base_dir + "/lib"

import pycdf