Skip to content
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

Update requirements.txt #421

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

aymanharrawi
Copy link

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 # psf/requests#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
Copy link
Contributor

hyrulelinks commented Apr 30, 2024

#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
Copy link
Author

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
Copy link
Owner

dmMaze commented Apr 30, 2024

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 psf/requests#5740

@aymanharrawi
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Author

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: 00e4c9f
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 . . .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants