-1

I'm having problem in importing my created module in pydroid 3. The process seems very simple in desktop version of python 3 but I tried doing it in Mobile in pydroid 3 application, but it does not work. The output was no module named ‘mymodule’ found When I created my module using Def and saved with mymodule.py

def sky(name): return ("Welcome, " + name)

Error!

Python 3.8.3 (default, May 27 2020, 02:08:17) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import mymodule Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'mymodule'

Seed
  • 1
  • 1
  • 4

5 Answers5

0

I was having the same problem too , then i moved the module to ru.iiec.pydroid3 . Try it and see if it works .

0

I was also having the same problem but, after searching on the terminal for some time, I got the directory of modules ; ) here's the path:

/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.8

Move your file to this directory. I hope it will help you.

gab
  • 792
  • 1
  • 10
  • 36
Eliot Branco
  • 23
  • 1
  • 6
0

I don't know what's going wrong with your module, but try putting it on PyPI (Website) go to the terminal in the app, and type: pip install Mymodule.

DINOTICK
  • 3
  • 4
0

Just make sure your module is saved in the same folder first the just type From followed by the name of your module and import your function then you can just print or do what ever you want with the module.

Also you can just import the whole module by importing it.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Jamaal
  • 1
0

I had this problem too. I solved it opening the file (the main file) dirrctly on Pydroid3. When you open the a file outside the application (ie, by other external file manager) Pydroid opens the file on a differente directory/link like content://localhost:... and something like that. But when you open directly in Pydroid the file will be charged at original path (e.g. /storage/0/emulated/.../file.py and Pydroid could recognize the module because you are in the correct path/directory.