(venv) hoangcongtuan@MacBook-Pro-2019 multi_lang_res_build_android % pip uninstall googletrans
Found existing installation: googletrans 3.0.0
Uninstalling googletrans-3.0.0:
Would remove:
/Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/bin/translate
/Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages/googletrans-3.0.0-py3.9.egg
Proceed (y/n)? y
Successfully uninstalled googletrans-3.0.0
(venv) hoangcongtuan@MacBook-Pro-2019 multi_lang_res_build_android % git clone https://g...content-available-to-author-only...b.com/alainrouillon/py-googletrans.git
fatal: destination path 'py-googletrans' already exists and is not an empty directory.
(venv) hoangcongtuan@MacBook-Pro-2019 multi_lang_res_build_android % cd py-googletrans
(venv) hoangcongtuan@MacBook-Pro-2019 py-googletrans % git branch
* feature/enhance-use-of-direct-api
master
(venv) hoangcongtuan@MacBook-Pro-2019 py-googletrans % python setup.py install
running install
running bdist_egg
running egg_info
writing googletrans.egg-info/PKG-INFO
writing dependency_links to googletrans.egg-info/dependency_links.txt
writing requirements to googletrans.egg-info/requires.txt
writing top-level names to googletrans.egg-info/top_level.txt
reading manifest file 'googletrans.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'googletrans.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.15-x86_64/egg
running install_lib
running build_py
creating build/bdist.macosx-10.15-x86_64/egg
creating build/bdist.macosx-10.15-x86_64/egg/googletrans
copying build/lib/googletrans/models.py -> build/bdist.macosx-10.15-x86_64/egg/googletrans
copying build/lib/googletrans/client.py -> build/bdist.macosx-10.15-x86_64/egg/googletrans
copying build/lib/googletrans/constants.py -> build/bdist.macosx-10.15-x86_64/egg/googletrans
copying build/lib/googletrans/__init__.py -> build/bdist.macosx-10.15-x86_64/egg/googletrans
copying build/lib/googletrans/gtoken.py -> build/bdist.macosx-10.15-x86_64/egg/googletrans
copying build/lib/googletrans/utils.py -> build/bdist.macosx-10.15-x86_64/egg/googletrans
copying build/lib/googletrans/urls.py -> build/bdist.macosx-10.15-x86_64/egg/googletrans
byte-compiling build/bdist.macosx-10.15-x86_64/egg/googletrans/models.py to models.cpython-39.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/googletrans/client.py to client.cpython-39.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/googletrans/constants.py to constants.cpython-39.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/googletrans/__init__.py to __init__.cpython-39.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/googletrans/gtoken.py to gtoken.cpython-39.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/googletrans/utils.py to utils.cpython-39.pyc
byte-compiling build/bdist.macosx-10.15-x86_64/egg/googletrans/urls.py to urls.cpython-39.pyc
creating build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
installing scripts to build/bdist.macosx-10.15-x86_64/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/bdist.macosx-10.15-x86_64/egg/EGG-INFO/scripts
copying build/scripts-3.9/translate -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO/scripts
changing mode of build/bdist.macosx-10.15-x86_64/egg/EGG-INFO/scripts/translate to 755
copying googletrans.egg-info/PKG-INFO -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
copying googletrans.egg-info/SOURCES.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
copying googletrans.egg-info/dependency_links.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
copying googletrans.egg-info/requires.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
copying googletrans.egg-info/top_level.txt -> build/bdist.macosx-10.15-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/googletrans-3.0.0-py3.9.egg' and adding 'build/bdist.macosx-10.15-x86_64/egg' to it
removing 'build/bdist.macosx-10.15-x86_64/egg' (and everything under it)
Processing googletrans-3.0.0-py3.9.egg
Copying googletrans-3.0.0-py3.9.egg to /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Adding googletrans 3.0.0 to easy-install.pth file
Installing translate script to /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/bin
Installed /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages/googletrans-3.0.0-py3.9.egg
Processing dependencies for googletrans==3.0.0
Searching for httpx==0.13.3
Best match: httpx 0.13.3
Adding httpx 0.13.3 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for sniffio==1.1.0
Best match: sniffio 1.1.0
Adding sniffio 1.1.0 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for hstspreload==2020.9.15
Best match: hstspreload 2020.9.15
Adding hstspreload 2020.9.15 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for chardet==3.0.4
Best match: chardet 3.0.4
Adding chardet 3.0.4 to easy-install.pth file
Installing chardetect script to /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/bin
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for idna==2.10
Best match: idna 2.10
Adding idna 2.10 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for httpcore==0.9.1
Best match: httpcore 0.9.1
Adding httpcore 0.9.1 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for certifi==2020.6.20
Best match: certifi 2020.6.20
Adding certifi 2020.6.20 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for rfc3986==1.4.0
Best match: rfc3986 1.4.0
Adding rfc3986 1.4.0 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for h2==3.2.0
Best match: h2 3.2.0
Adding h2 3.2.0 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for h11==0.9.0
Best match: h11 0.9.0
Adding h11 0.9.0 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for hpack==3.0.0
Best match: hpack 3.0.0
Adding hpack 3.0.0 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Searching for hyperframe==5.2.0
Best match: hyperframe 5.2.0
Adding hyperframe 5.2.0 to easy-install.pth file
Using /Users/hoangcongtuan/python_project/multi_lang_res_build_android/venv/lib/python3.9/site-packages
Finished processing dependencies for googletrans==3.0.0
(venv) hoangcongtuan@MacBook-Pro-2019 py-googletrans % python
Python 3.9.0 (default, Oct 27 2020, 14:15:17)
[Clang 12.0.0 (clang-1200.0.32.21)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from googletrans import Translator
>>> translator = Translator(service_urls=['translate.googleapis.com']) # At direct pip install,this service_url : translate.googleapis.com will not work , this is the indicator that new code had been installed
>>> translated_text = translator.translate("सभी एक में अश्वशक्ति रंग लेजर प्रिंटर",dest="en")
>>> print(translated_text.text)
सभी एक में अश्वशक्ति रंग लेजर प्रिंटर
>>>