dmMaze / BallonsTranslator

深度学习辅助漫画翻译工具, 支持一键机翻和简单的图像/文本编辑 | Yet another computer-aided comic/manga translation tool powered by deeplearning
GNU General Public License v3.0
2.41k stars 162 forks source link

Update requirements.txt #421

Open aymanharrawi opened 4 months ago

aymanharrawi commented 4 months ago

chatgpt helped me to fix the requirements file for "ModuleNotFoundError: No module named 'urllib3.packages.six.moves'" issues

It seems like the issue you're facing is with the urllib3 package. To fix this, you can try specifying a version of urllib3 that is compatible with your other packages. You can also try upgrading urllib3 to the latest version. Here's an updated requirements.txt file with a fixed urllib3 version and some other minor adjustments:

PyQt6-Qt6==6.4.2 # for qt>6.4.2 , framelesswindow is broken on windows, and text rendering is wrong on macOS PyQt6==6.4.2 #PyQt5>=5.15.9 numpy urllib3>=1.26.6 # https://github.com/psf/requests/issues/5740 jaconv torch torchvision transformers fugashi unidic_lite tqdm opencv-python shapely pyclipper einops termcolor bs4 deepl qtpy spacy-pkuseg sentencepiece ctranslate2 python-docx docx2txt piexif keyboard ordered-set opencc-python-reimplemented requests Pillow beautifulsoup4 colorama openai pyyaml natsort py7zr multivolumefile httpx[socks,brotli] langdetect pywin32; sys_platform == 'win32' winsdk; sys_platform == 'win32' brotlicffi; sys_platform == 'win32' pyobjc-core; sys_platform == 'darwin' pyobjc-framework-cocoa; sys_platform == 'darwin' pyobjc-framework-coreml; sys_platform == 'darwin' pyobjc-framework-quartz; sys_platform == 'darwin' pyobjc-framework-vision; sys_platform == 'darwin'

hyrulelinks commented 4 months ago

https://github.com/dmMaze/BallonsTranslator/pull/446

截屏2024-04-30 11 57 05

After testing, it does not need to be changed so much, and as long as the latest urllib3 is used on macOS, there will be no error

@aymanharrawi @dmMaze

aymanharrawi commented 3 months ago

well, in windows its big problem, just update this line urllib3>=1.26.6 To prevent crashing while trying to launch

446

截屏2024-04-30 11 57 05

After testing, it does not need to be changed so much, and as long as the latest urllib3 is used on macOS, there will be no error

@aymanharrawi @dmMaze

dmMaze commented 3 months ago

well, in windows its big problem, just update this line

No, so far you're the first to report such problem, and urllib3==1.25.11 works fine with my win11/win10 PCs. Besides, there's a problem with urllib3 != 1.25.11 if system proxy is enabled https://github.com/psf/requests/issues/5740

aymanharrawi commented 3 months ago

but using urllib3>=1.26.6 may fix problem if system proxy enabled ? I just used urllib3>=1.26.6 in my requirements file and worked fine perfectly, i didn't able to launch with urllib3 != 1.25.11 , is there a problem just to use urllib3>=1.26.6??

hyrulelinks commented 3 months ago

but using urllib3>=1.26.6 may fix problem if system proxy enabled ? I just used urllib3>=1.26.6 in my requirements file and worked fine perfectly, i didn't able to launch with urllib3 != 1.25.11 , is there a problem just to use urllib3>=1.26.6??

What is the major version of your Python environment? Is it 3.11 or 3.12? I am using 3.12 on MacOS, updated urllib3 to the latest version while keeping other dependencies unchanged, and it can run normally. I haven't tried it on Windows yet.

aymanharrawi commented 3 months ago

but using urllib3>=1.26.6 may fix problem if system proxy enabled ? I just used urllib3>=1.26.6 in my requirements file and worked fine perfectly, i didn't able to launch with urllib3 != 1.25.11 , is there a problem just to use urllib3>=1.26.6??

What is the major version of your Python environment? Is it 3.11 or 3.12? I am using 3.12 on MacOS, updated urllib3 to the latest version while keeping other dependencies unchanged, and it can run normally. I haven't tried it on Windows yet.

3.12

aymanharrawi commented 3 months ago

this this error that happens when use urllib3 != 1.25.11, it fixed when i used urllib3>=1.26.6 instead

C:\Users\dell\my files\manga\BallonsTranslator>cd C:\Users\dell\my files\manga\BallonsTranslator\ C:\Users\dell\my files\manga\BallonsTranslator\launch.py:10: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources py version: 3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)] py executable: C:\Users\dell\AppData\Local\Programs\Python\Python312\python.exe version: 1.4.0 branch: dev Commit hash: 00e4c9f143971b8541eb54050a620a9a0a53678a Traceback (most recent call last): File "C:\Users\dell\my files\manga\BallonsTranslator\launch.py", line 285, in main() File "C:\Users\dell\my files\manga\BallonsTranslator\launch.py", line 152, in main from utils import config as program_config File "C:\Users\dell\my files\manga\BallonsTranslator\utils\config.py", line 8, in from .io_utils import json_dump_nested_obj File "C:\Users\dell\my files\manga\BallonsTranslator\utils\io_utils.py", line 9, in import requests File "C:\Users\dell\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests__init.py", line 43, in import urllib3 File "C:\Users\dell\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\init__.py", line 7, in from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url File "C:\Users\dell\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\connectionpool.py", line 11, in from .exceptions import ( File "C:\Users\dell\AppData\Local\Programs\Python\Python312\Lib\site-packages\urllib3\exceptions.py", line 2, in from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead ModuleNotFoundError: No module named 'urllib3.packages.six.moves' Press any key to continue . . .