mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore(updater): address deprecation of pkg_resources
as per module docstring: This module is deprecated. Users are directed to importlib.resources, importlib.metadata and packaging instead.
This commit is contained in:
parent
67ada70a26
commit
45bf2c7da6
@ -5,8 +5,8 @@ pip install <path_to_git_source>.
|
||||
import os
|
||||
import platform
|
||||
from distutils.version import LooseVersion
|
||||
from importlib.metadata import PackageNotFoundError, distribution
|
||||
|
||||
import pkg_resources
|
||||
import psutil
|
||||
import requests
|
||||
from rich import box, print
|
||||
@ -89,12 +89,11 @@ def welcome(latest_release: str, latest_prerelease: str):
|
||||
|
||||
|
||||
def get_extras():
|
||||
extras = ""
|
||||
try:
|
||||
_ = pkg_resources.get_distribution("xformers")
|
||||
distribution("xformers")
|
||||
extras = "[xformers]"
|
||||
except pkg_resources.DistributionNotFound:
|
||||
pass
|
||||
except PackageNotFoundError:
|
||||
extras = ""
|
||||
return extras
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user