简体   繁体   中英

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.

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 inte.net. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM