1

I am trying to run a python code on my Android 7.1 mobile using QPython3 app. I clicked on the "Menu" tab and then "Run script" option. Out of many programs, I opened "pip_console.py" and typed

pip install pandas

This gives me error -

AtrributeError: 'Distribution' object has no attribute '_egg_fetcher'

This is true in case of any other module as well. Just to make sure that I am using the latest version, I ran

pip install --upgrade pip

but this also fails and gives an error that

it can not open /sdcard/qpython/lib.. directory

I am not sure whether this app was properly installed and whether this is the right way to install modules. Can someone please help ?

Thanks,

Sanket.

Sanket
  • 119
  • 1
  • 6
  • 15

1 Answers1

0

You can use pip in code as specified by this answer.

You can do it like this:

import pip

pip.main(['install','pandas'])

MB11
  • 610
  • 1
  • 5
  • 16
  • Sorry that I did not mention it earlier, but I have already tried pip.main(['install','pandas']) and it gives me exactly same error - AtrributeError: 'Distribution' object has no attribute '_egg_fetcher' – Sanket Jan 29 '18 at 06:47
  • In the description mentioned for qpython3 on play store it is specified that the "It is the only Python interpreter which works under android 4.0 in google play" while you are running android 7.1. Might be some permission issues. – MB11 Jan 29 '18 at 06:57