'ModuleNotFoundError: No module X when using PyDroid3
I have made a Python 3 translator, but it shows an error when I run it. This is the code I have used:
from translate import Translator
s = Translator(from_lang=input('From.Language:'), to_lang=input('To.Language:'))
res = s.translate(input('Write your text: '))
print('res')
The error is (screenshot):
ModuleNotFoundError: No module named 'translate'
How can I fix this on an Android phone? I am using Pydroid3.
Solution 1:[1]
The error is because the module is not installed in device. Before performing a Python project execution you should first install the package or pip from internet. For example for this question we need translate
pip which will help you to run this project. You can first install pip in your device then can run the project for more read official document
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |