facenet-pytorch
facenet-pytorch copied to clipboard
User Warning when using PyInstaller: torchvision\__init__.py:26: UserWarning: You are importing torchvision within its own root folder
When packaging my module using PyInstaller where I have import facenet_pytorch
This user warning comes out and I think it is leading torch problems down the line:
torchvision_init_.py:26: UserWarning: You are importing torchvision within its own root folder (C:\Projects\NDI_FaceTrack_v1\NDI_FaceTrack\dist\cli). This is not expected to work and may give errors. Please exit the torchvision project source and relaunch your python interpreter.
I've dialed the error down to this line as the Warning disappears if I comment the import line.
python = 3.8.6 torchaudio = 1.7.0 torchvision = 0.8.1 facenet-pytorch = 2.5.1 pyinstaller = 4.1
Hi, can you share your build.spec
?
I think this happend because you install torchvision, and you are import torchvision in the install directory. so, you could cd ../ (just change a directory) and then python import torchvision It's OK
I think this happend because you install torchvision, and you are import torchvision in the install directory. so, you could cd ../ (just change a directory) and then python import torchvision It's OK
Oh~ Yes! Thx a lot, it confused me for a long time!
I think this happend because you install torchvision, and you are import torchvision in the install directory. so, you could cd ../ (just change a directory) and then python import torchvision It's OK
Great!