yan12125/python3-android

Error using pip

Closed this issue · 10 comments

Error. When using pip, only those modules are installed that do not require assembly.
In order to assemble the module, you need to throw gcc and so on, which is not a problem. But during the build, an error occurs that refers to the clang from ndk on the computer. How can this be fixed?

You can use CC=gcc pip install XXX to specify the compiler you want. For further discussions, please go to #9.

You can use CC=gcc pip install XXX to specify the compiler you want. For further discussions, please go to #9.

where this to write?
And what is XXX ?

where this to write?

The same place as you run pip.

And what is XXX ?

XXX is the Python package you want to install via pip.

where this to write?

The same place as you run pip.

And what is XXX ?

XXX is the Python package you want to install via pip.

no, no, no! compiler requires /home folder!

Please run CC=gcc pip install -v XXX from the terminal and paste error messages you get.

Delete

Please run CC=gcc pip install -v XXX from the terminal and paste error messages you get.

Show file
log2.txt

without CC=gcc
log1.txt

arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory

Your gcc is broken.

arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory

Your gcc is broken.

then why compiled in termux python3.9 with the same gcc works without errors?

From what I can see, possible reasons might be:

  1. Apparently you are running pip with root. As far as I know su does not work quite well with Termux.
  2. From the following line in log2.txt, you are not using gcc from Termux but some custom one.

error: command '/data/local/python3.9.0/bin/gcc' failed with exit code 1


I've just tried gcc from Termux. LDSHARED is also needed to install bsdiff4. Here is the command I use:

LDSHARED="gcc -shared" CC=gcc ./usr/bin/python3 -m pip -v install bsdiff4

A complete log can be found here: bsdiff4.txt