I'm having trouble using gTTS (Google Text to Speech) on my raspberry Pi 3. I simply did
sudo pip3 install gTTS
to install it. But when I run my code I find this error :
File "interface.py", line 7, in <module>
from gtts import *
File "/usr/local/lib/python3.4/dist-packages/gtts/\__init__.py", line 2, in <module>
from .tts import gTTS
File "/usr/local/lib/python3.4/dist-packages/gtts/tts.py", line 4, in <module>
from requests.packages.urllib3.exceptions import InsecureRequestWarning
ImportError: cannot import name 'InsecureRequestWarning'
To try to solve the problem I did
sudo easy_install --upgrade pip
Then I have uninstalled and installed again gtts but the problem persists.
Thank you very much for your help ! :(
PS : I have installed python-vlc and mutagen to make working gTTS (as I did on a windows device)
Just update requests
library
pip install -U requests
Try this way.`
import urllib3`
urllib3.disable_warnings()
Though it doesn't remove the entire warning message, still removes the Insecure Request Warning
Fixed it by running pip install requests==2.6.0
if you face issue with bringing request library to 2.6.0 first remove pyopenssl and then run pip install requests==2.6.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With