Hi,
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>
import cfFile “/home/thomas/Documents/Python/nemo_unagi/lib/python3.9/site-packages/cf/init.py”, line 126, in
import cfunitsFile “/home/thomas/Documents/Python/nemo_unagi/lib/python3.9/site-packages/cfunits/init.py”, line 47, in
from .units import Units # noqa: F401File “/home/thomas/Documents/Python/nemo_unagi/lib/python3.9/site-packages/cfunits/units.py”, line 41, in
raise FileNotFoundError(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.
Thanks
Thomas