Closed GreyGuoweiChen closed 1 year ago
Hey @GreyGuoweiChen let us look into it. I am traveling these week, but I will do my best :)
Also the error seems to be related to the interplay between torchmetrics
and torchaudio
🤔? have you tried without installing torchaudio
. Even if you need that library it would be good to see if the issue raises from that library.
maybe @gradientsky has seen this?
Hello @jrzaurin ,
Thanks for your timely reply, and wish you a happy travel. I have some tries and have avoided this bug.
Firstly, I tried to upgrade the pytorch package to 2.0.1 sa below.
pytorch 2.0.1 py3.8_0 pytorch
pytorch-widedeep 1.3.2 dev_0 <develop>
torchaudio 2.0.2 py38_cpu pytorch
torchmetrics 1.2.0 pypi_0 pypi
torchvision 0.15.2 py38_cpu pytorch
And the error turns to
Traceback (most recent call last): File "/Users/graveschan/PycharmProjects/virus_host/WD_model.py", line 1, in
from pytorch_widedeep import Trainer File "/Users/graveschan/software/pytorch-widedeep/pytorch_widedeep/init.py", line 9, in from pytorch_widedeep.utils import ( File "/Users/graveschan/software/pytorch-widedeep/pytorch_widedeep/utils/init.py", line 1, in from pytorch_widedeep.utils.text_utils import ( File "/Users/graveschan/software/pytorch-widedeep/pytorch_widedeep/utils/text_utils.py", line 7, in from pytorch_widedeep.utils.fastai_transforms import Vocab, Tokenizer File "/Users/graveschan/software/pytorch-widedeep/pytorch_widedeep/utils/fastai_transforms.py", line 21, in from pytorch_widedeep.wdtypes import ( File "/Users/graveschan/software/pytorch-widedeep/pytorch_widedeep/wdtypes.py", line 23, in from torchvision.transforms import ( File "/Users/graveschan/miniforge3/envs/host_pred/lib/python3.8/site-packages/torchvision/init.py", line 6, in from torchvision import datasets, io, models, ops, transforms, utils File "/Users/graveschan/miniforge3/envs/host_pred/lib/python3.8/site-packages/torchvision/datasets/init.py", line 1, in from ._optical_flow import FlyingChairs, FlyingThings3D, HD1K, KittiFlow, Sintel File "/Users/graveschan/miniforge3/envs/host_pred/lib/python3.8/site-packages/torchvision/datasets/_optical_flow.py", line 10, in from PIL import Image File "/Users/graveschan/miniforge3/envs/host_pred/lib/python3.8/site-packages/PIL/Image.py", line 103, in from . import _imaging as core ImportError: dlopen(/Users/graveschan/miniforge3/envs/host_pred/lib/python3.8/site-packages/PIL/_imaging.cpython-38-darwin.so, 0x0002): Library not loaded: @rpath/libtiff.5.dylib Referenced from: /Users/graveschan/miniforge3/envs/host_pred/lib/python3.8/site-packages/PIL/_imaging.cpython-38-darwin.so Reason: tried: '/Users/graveschan/miniforge3/envs/host_pred/lib/python3.8/site-packages/PIL/../../../libtiff.5.dylib' (no such file), '/Users/graveschan/miniforge3/envs/host_pred/lib/python3.8/site-packages/PIL/../../../libtiff.5.dylib' (no such file), '/Users/graveschan/miniforge3/envs/host_pred/bin/../lib/libtiff.5.dylib' (no such file), '/Users/graveschan/miniforge3/envs/host_pred/bin/../lib/libtiff.5.dylib' (no such file), '/usr/local/lib/libtiff.5.dylib' (no such file), '/usr/lib/libtiff.5.dylib' (no such file)
And then I downgraded the Pillow to 9.3.0. This solves the error as above.
Hey @GreyGuoweiChen many thanks for all this info. I plan to review dependencies also related to another issue as soon as I can and this will be helpful!
thanks again and thanks for opening the issue :)
requirements have been updated and unit tests passed in GPU and CPU, with python versions 3.8, 3.9 and 3.10.
Hopefully there will be no dependencies issues directly related to the library
This problem happens to me, when importing the package
The environment is MacOS M1 arm, miniforge, and packages are as: