Skip to content

Commit 8137d89

Browse files
JamieMartinJamiejongwook
authored andcommitted
import packaging to be compatible with setuptools==70.0.0 (openai#449)
* import packaging to be compatible with setuptools==70.0.0 * importing the version module --------- Co-authored-by: Jamie <[email protected]> Co-authored-by: Jong Wook Kim <[email protected]>
1 parent 4610075 commit 8137d89

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clip/clip.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import os
33
import urllib
44
import warnings
5-
from typing import Any, Union, List
6-
from pkg_resources import packaging
5+
from packaging import version
6+
from typing import Union, List
77

88
import torch
99
from PIL import Image
@@ -20,7 +20,7 @@
2020
BICUBIC = Image.BICUBIC
2121

2222

23-
if packaging.version.parse(torch.__version__) < packaging.version.parse("1.7.1"):
23+
if version.parse(torch.__version__) < version.parse("1.7.1"):
2424
warnings.warn("PyTorch version 1.7.1 or higher is recommended")
2525

2626

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
ftfy
2+
packaging
23
regex
34
tqdm
45
torch

0 commit comments

Comments
 (0)