termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
37.02k stars 3.89k forks source link

I can't run the script( #4090

Closed sxgphIre closed 3 months ago

sxgphIre commented 3 months ago

Problem description

All requirements from requirements.txt were met, but the error could not be avoided(

Steps to reproduce the behavior.

I suffered for 3 hours, but nothing helped. And there was nothing useful for me on the Internet.

What is the expected behavior?

Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/numpy/_core/init.py", line 23, in from . import multiarray File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/numpy/_core/multiarray.py", line 10, in from . import overrides File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/numpy/_core/overrides.py", line 8, in from numpy._core._multiarray_umath import ( ImportError: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/data/com.termux/files/usr/lib/python3.11/site-packages/numpy/_core/_multiarray_umath.cpython-311.so"...

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/numpy/init.py", line 114, in from numpy.config import show as show_config File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/numpy/config.py", line 4, in from numpy._core._multiarray_umath import ( File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/numpy/_core/init.py", line 49, in raise ImportError(msg) ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.

Original error was: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/data/com.termux/files/usr/lib/python3.11/site-packages/numpy/_core/_multiarray_umath.cpython-311.so"...

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/sdcard/Download/AyuGram/Valkyrie/valkyrie.py", line 24, in import pytesseract File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pytesseract/init.py", line 2, in from .pytesseract import ALTONotSupported File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pytesseract/pytesseract.py", line 34, in from numpy import ndarray File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/numpy/init.py", line 119, in raise ImportError(msg) from e ImportError: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there.

System information

TomJo2000 commented 3 months ago

You seem to be attempting to build numpy. Please be aware we have a python-numpy package available in the repositories, which should most likely work for your needs (though it is still version 1.26.5 for now).

If you still need to compile it from source please see: