py-googletrans icon indicating copy to clipboard operation
py-googletrans copied to clipboard

Outdated httpx version

Open Vishuvrm opened this issue 11 months ago • 10 comments

The latest version of the googletrans library(4.0.0rc1) uses the httpx version = 0.13.3, which are incompatible with other libraries. I get below error/warning while installing it.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. anthropic 0.20.0 requires httpx<1,>=0.23.0, but you have httpx 0.13.3 which is incompatible. openai 1.14.3 requires httpx<1,>=0.23.0, but you have httpx 0.13.3 which is incompatible. Successfully installed googletrans-4.0.0rc1 h11-0.9.0 httpcore-0.9.1 httpx-0.13.3 idna-2.10

Please upgrade the version of httpx library used.

Vishuvrm avatar Apr 01 '24 07:04 Vishuvrm

https://github.com/ssut/py-googletrans/pull/381/files

This PR #381 works!

Just install the googletrans before openai package to let googletrans use httpx==0.23.0.

pip install googletrans==4.0.0-rc1
pip install openai

ligen131 avatar Apr 03 '24 06:04 ligen131

I'm in the same situation. I'm temporarily using it, but I'm going to sleep when the version is up.

yoosungung avatar Apr 08 '24 01:04 yoosungung

So I installed: pip install googletrans==4.0.0-rc1 --- still not working. Can anyone explain in detail?

miraculix95 avatar May 20 '24 15:05 miraculix95

So I installed: pip install googletrans==4.0.0-rc1 --- still not working. Can anyone explain in detail?

Did you follow my step? After you install it you should modify the code and install openai.

If it still doesn't work, please share more details about how you installed these two packages.

ligen131 avatar May 20 '24 15:05 ligen131

It works. In your previous comment it was just not very clear that I also need to change the code. Obvious for a python expert, not clear and easy to understand for a beginner like me. Thanks a lot !!!

miraculix95 avatar May 21 '24 08:05 miraculix95

https://github.com/ssut/py-googletrans/pull/381/files

This PR #381 works!

Just install the googletrans before openai package to let googletrans use httpx==0.23.0.

pip install googletrans==4.0.0-rc1
pip install openai

This does not work. It gives error:

AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport'

This is because newer versions of httpcore (0.23.0) very likely have removed or renamed this attribute.

The problem is: openai 1.26.0 requires httpx<1,>=0.23.0 and googletrans 3.0.0 requires httpx==0.13.3

Only solution is wait till googletrans gets updated to use httpx<1,>=0.23.0 or use other translator,

atuldpatil avatar May 26 '24 10:05 atuldpatil

https://github.com/ssut/py-googletrans/pull/381/files This PR #381 works! Just install the googletrans before openai package to let googletrans use httpx==0.23.0.

pip install googletrans==4.0.0-rc1
pip install openai

This does not work. It gives error:

AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport'

This is because newer versions of httpcore (0.23.0) very likely have removed or renamed this attribute.

The problem is: openai 1.26.0 requires httpx<1,>=0.23.0 and googletrans 3.0.0 requires httpx==0.13.3

Only solution is wait till googletrans gets updated to use httpx<1,>=0.23.0 or use other translator,

Yes you are right. So please see the PR I mentioned. It removed this attribute to solve this problem temporarily.

ligen131 avatar May 26 '24 10:05 ligen131

Made the changes to googletrans package as indicated here and it is working :) Many thanks @ligen131 https://github.com/ssut/py-googletrans/pull/381/files

atuldpatil avatar May 27 '24 04:05 atuldpatil

https://github.com/ssut/py-googletrans/pull/381/files This PR #381 works! Just install the googletrans before openai package to let googletrans use httpx==0.23.0.

pip install googletrans==4.0.0-rc1
pip install openai

This does not work. It gives error: AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport' This is because newer versions of httpcore (0.23.0) very likely have removed or renamed this attribute. The problem is: openai 1.26.0 requires httpx<1,>=0.23.0 and googletrans 3.0.0 requires httpx==0.13.3 Only solution is wait till googletrans gets updated to use httpx<1,>=0.23.0 or use other translator,

Yes you are right. So please see the PR I mentioned. It removed this attribute to solve this problem temporarily.

I installed googletrans==4.0.0-rc1, then changed the file to proxies=None. But again I got the same error to install openai: googletrans 4.0.0rc1 requires httpx==0.13.3, but you have httpx 0.27.0 which is incompatible.

haniyeh-ft avatar Jul 18 '24 14:07 haniyeh-ft

@haniyeh-ft hello did you install openai after googletrans==4.0.0-rc1? You should do it to make sure the version (of httpx==0.23.0) is correct.

ligen131 avatar Jul 18 '24 18:07 ligen131