Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0613· OpenAIAi2 WildChat-4.8M (AI2)

I get an error when importing scikit-image into python under termux on Android:…

  1. User

    I get an error when importing scikit-image into python under termux on Android: Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/skimage/init.py", line 122, in from ._shared import geometry ImportError: dlopen failed: cannot locate symbol "PyExc_ImportError" referenced by "/data/data/com.termux/files/usr/lib/python3.11/site-packages/skimage/_shared/geometry.cpython-311.so"...

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/storage/emulated/0/fuckingpython/2dto3d.py", line 3, in from skimage import measure File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/skimage/init.py", line 125, in _raise_build_error(e) File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/skimage/init.py", line 102, in _raise_build_error raise ImportError( ImportError: dlopen failed: cannot locate symbol "PyExc_ImportError" referenced by "/data/data/com.termux/files/usr/lib/python3.11/site-packages/skimage/_shared/geometry.cpython-311.so"... It seems that scikit-image has not been built correctly.

  2. Assistant

    The error you are encountering suggests that there may be an issue with how scikit-image was built and installed in your environment. Here are a few steps you can try to resolve this issue:

    1. Update termux and its packages to make sure you have the latest versions:

      apt update
      apt upgrade
      
    2. Reinstall the scikit-image package:

      pip uninstall scikit-image
      pip install scikit-image
      
    3. If reinstalling scikit-image doesn't solve the problem, you can try reinstalling numpy and scikit-learn as well:

      pip uninstall numpy scikit-learn
      pip install numpy scikit-learn
      
    4. If the problem still persists, you can try using a different method to install scikit-image. Instead of using the pip package manager, you can try installing it using the apt package manager provided by termux:

      apt install python-skimage
      

      Note that this method may not always have the latest version of scikit-image available.

    If none of these solutions work, you may want to consider seeking help from the termux community or the scikit-image project support channels to get a more specific resolution to this issue.