py-googletrans
py-googletrans copied to clipboard
Outdated httpx version
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.
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
I'm in the same situation. I'm temporarily using it, but I'm going to sleep when the version is up.
So I installed: pip install googletrans==4.0.0-rc1 --- still not working. Can anyone explain in detail?
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.
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 !!!
https://github.com/ssut/py-googletrans/pull/381/files
This PR #381 works!
Just install the
googletrans
beforeopenai
package to letgoogletrans
usehttpx==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,
https://github.com/ssut/py-googletrans/pull/381/files This PR #381 works! Just install the
googletrans
beforeopenai
package to letgoogletrans
usehttpx==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.
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
https://github.com/ssut/py-googletrans/pull/381/files This PR #381 works! Just install the
googletrans
beforeopenai
package to letgoogletrans
usehttpx==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 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.