-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name 'packaging' from 'pkg_resources' #244
Comments
try uninstall setuptools and install setuptools==69.5.1 |
Hey, |
I solved the problem with 2 steps. from torchvision.transforms.functional import rgb_to_grayscale
|
in my server ,i use python 3.8 ,uninstall setuptools and install setuptools==69.5.1 ,then it worked. :) |
Trying to run inference.py I get following error:
Traceback (most recent call last):
File "inference.py", line 16, in
from third_part.GPEN.gpen_face_enhancer import FaceEnhancement
File "/home/anastalaz/dev/video-retalking/third_part/GPEN/gpen_face_enhancer.py", line 8, in
from face_model.face_gan import FaceGAN
File "/home/anastalaz/dev/video-retalking/third_part/GPEN/face_model/face_gan.py", line 13, in
from face_model.gpen_model import FullGenerator
File "/home/anastalaz/dev/video-retalking/third_part/GPEN/face_model/gpen_model.py", line 16, in
from face_model.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
File "/home/anastalaz/dev/video-retalking/third_part/GPEN/face_model/op/init.py", line 1, in
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "/home/anastalaz/dev/video-retalking/third_part/GPEN/face_model/op/fused_act.py", line 8, in
from torch.utils.cpp_extension import load, _import_module_from_library
File "/home/anastalaz/miniconda3/envs/video_retalking/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 23, in
from pkg_resources import packaging # type: ignore[attr-defined]
ImportError: cannot import name 'packaging' from 'pkg_resources'
Anyone knows what to do?
The text was updated successfully, but these errors were encountered: