I am using a python virtual environment and have installed cf-python using
pip install cf-python. When running
import cf in spyder I receive the following message:
Traceback (most recent call last):
File “/tmp/ipykernel_18462/2405381555.py”, line 1, in <cell line: 1>
File “/home/thomas/Documents/Python/nemo_unagi/lib/python3.9/site-packages/cf/init.py”, line 126, in
File “/home/thomas/Documents/Python/nemo_unagi/lib/python3.9/site-packages/cfunits/init.py”, line 47, in
from .units import Units # noqa: F401
File “/home/thomas/Documents/Python/nemo_unagi/lib/python3.9/site-packages/cfunits/units.py”, line 41, in
FileNotFoundError: cfunits requires UNIDATA UDUNITS-2. Can’t find the ‘udunits2’ library.
I can see in the directory of the virtual environment ‘lib/python3.9/site-packages/cfunits/etc’ that ‘udunits’ exists. Could you advise how I can go about making cf-python work?
I have even tried manually installing udunits in ‘site-packages’, but to no avail.