label-studio start 启动卡在Starting new HTTPS connection (1): pypi.org:443解决方法

label-studio start 启动卡在Starting new HTTPS connection (1): pypi.org:443解决方法
经过大量的测试发现Label Studio卡在连接 Redis上但是似乎社区版本身是禁用的不知道为什么还会出现此类问题故记录一下分享经验解决方法第一步通过powershell命令from pathlib import Pathimport shutilimport label_studiopath Path(label_studio.__file__).parent / core / redis.pybackup path.with_suffix(.py.bak)shutil.copy2(path, backup)text path.read_text(encodingutf-8)old try:_redis get_connection()_redis.ping()logger.debug( Redis is connected successfully.)except: # noqa: E722logger.debug( Redis is not connected.)_redis Nonenew if settings.REDIS_ENABLED:try:_redis get_connection()_redis.ping()logger.debug( Redis is connected successfully.)except Exception:logger.debug( Redis is not connected.)_redis Noneelse:_redis Noneif old not in text:raise SystemExit(f没有找到待修改代码请勿继续{path})path.write_text(text.replace(old, new, 1), encodingutf-8)print(修复完成, path)print(备份文件, backup) | python -完成后powershell输入$env:LABEL_STUDIO_BASE_DATA_DIRE:\py\v1\ls-clean$env:LABEL_STUDIO_LATEST_VERSION_CHECKfalselabel-studio star完成后耐心等待即可完成注意1.E:\py\v1\ls-clean是我自己的目录要根据自己的目录情况ls-clean2.需要恢复原装时候可输入$RedisFile python -c import pathlib,label_studio;print(pathlib.Path(label_studio.__file__).parent / core / redis.py)Copy-Item $RedisFile.bak $RedisFile -Force进行恢复