The Dcoder app supports the Python programming language. However, for a code that requires 3rd-party modules (e.g. mlxtend), it will show the following error when running:

Dcoder app showing the error

Traceback (most recent call last):
  File "fun.py", line 7, in <module>
    from mlxtend.data import iris_data
ImportError: No module named mlxtend.data

Process finished with exit code 1.

How to install new Python modules in the Dcoder app?

  • Does Dcoder have a console? This may be out of scope for this site, but you may be able to use the pip module to install your missing module. – jlehenbauer Jan 31 at 15:28

As of February 2020, it is highly improbable to install new Python modules and/or run 3rd-party modules on Dcoder app.

The reason is, as stated in their app's description, it uses an online cloud service to compile and run the code.

Disclaimer: Dcoder uses array of strong cloud based compilers to compile the code and display output, [...]


Dcoder is an online compiler, now run, compile and execute your code snippets on your own android mobile devices.

To put it simply, Dcoder does not install Python nor compile the code on the user's device. Instead, the app works as a code editor, sends the code to the online compiler and runs it, then returns and shows the result on the app. As such, the modules are restricted to their online compiler.

To list which modules are installed, run the following code on Dcoder


set1 = 'list(k[1] for k in pkgutil.iter_modules())'
set2 = 's.modules.keys()'
set3 = 's.builtin_module_names'

import pkgutil, sys as s
def calculate(what): return eval(what)


Code modified from SOLOLEARN's Discussion Board

|improve this answer|||||
  • I've also asked for clarification/confirmation if it's possible to install new modules on their Twitter and now waiting for their response. – Andrew T. Jan 31 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.