Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies pandas and numpy don't install with pip on Termux #1945

Closed
5 tasks
kbarrett975 opened this issue Nov 24, 2023 · 10 comments
Closed
5 tasks

Dependencies pandas and numpy don't install with pip on Termux #1945

kbarrett975 opened this issue Nov 24, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@kbarrett975
Copy link

Screenshot_20231124_151500_Termux

Checklist

  • I'm reporting a bug in Sherlock's functionality
  • The bug I'm reporting is not a false positive or a false negative
  • I've verified that I'm running the latest version of Sherlock
  • I've checked for similar bug reports including closed ones
  • I've checked for pull requests that attempt to fix this bug

Description

WRITE DESCRIPTION HERE

@kbarrett975 kbarrett975 added the bug Something isn't working label Nov 24, 2023
@kbarrett975
Copy link
Author

What am I missing

@matheusfelipeog
Copy link
Collaborator

Thank you for opening this issue, @kbarrett975.

What exactly did you run to get this error?

@Kamski18
Copy link

Kamski18 commented Dec 11, 2023

I get the same problem.. I already install libcrypt and update all package to the newest version but after i ran

pip3 install -r requirements.txt

It still show the same error..may i know why

@Kamski18
Copy link

Screenshot_2023-12-11-13-44-49-17

@matheusfelipeog
Copy link
Collaborator

Thank you for providing the complete installation log, @Kamski18.

Try updating your pip, setuptools, and wheel with the following command:

python3 -m pip install --upgrade pip setuptools wheel

After that, try installing the dependencies again:

pip3 install -r requirements.txt

@Kamski18
Copy link

Kamski18 commented Dec 11, 2023

Thanks for the help @matheusfelipeog but I already update using the following command but still get an error

Screenshot_2023-12-11-16-39-02-48

@matheusfelipeog
Copy link
Collaborator

@kbarrett975 @Kamski18 It seems that Termux has issues building the numpy package wheel locally. The pandas package depends on numpy, so this error is generated when the build fails.

I've noticed that this is a common problem in Termux, with several complaints on:

link 1: termux/termux-packages#10808
link 2: termux/termux-app#3048
link 3: https://stackoverflow.com/questions/77228553/error-cant-install-pandas-library-on-termux-2023
link 4: termux/termux-app#3225

Unfortunately, to use the sherlock project in a Termux environment, you'll have to follow a few extra steps for now.

First, update the package list and install updates:

pkg update && pkg upgrade

Provide the y option for all when prompted.

The Termux community provides a repository of pre-built Python packages, called tur (Termux User Repository). This will avoid having to build some packages locally.

Let's install tur-repo and build-essential, which contains some necessary packages for building other packages:

pkg install build-essential tur-repo

After that, force an update on the package list again:

pkg update

Now, let's install the pre-built pandas and numpy packages globally:

pkg install python-pandas python-numpy

This will install the packages. You can check using:

pip list

Now you are ready to install the sherlock project dependencies:

pip install -r requirements.txt

I personally recommend installing sherlock project dependencies in a virtual environment instead of globally to avoid conflicts with dependencies from other projects.

To create a virtual environment within the locally cloned sherlock project repository, use the following command:

python -m venv --system-site-packages venv

The --system-site-packages flag will copy the packages installed globally to the virtual environment in venv. This ensures that we have pandas and numpy within the virtual environment.

To activate the virtual environment, use the following command:

source venv/bin/activate

Now, you can install the sherlock project dependencies in this virtual environment:

pip install -r requirements.txt

When you finish using sherlock, don't forget to deactivate the virtual environment:

deactivate

I've tested this, and it worked perfectly. I hope it works for you too. If you encounter any other problems, please let me know.

Refs:

ref 1: https://wiki.termux.com/wiki/Python
ref 2: https://github.com/termux-user-repository/tur
ref 3: https://docs.python.org/3/library/venv.html

@matheusfelipeog matheusfelipeog changed the title Sherlock Dependencies pandas and numpy don't install with pip on Termux Dec 11, 2023
@Kamski18
Copy link

THANKS! It work finally..Thank you for providing help for me!

@Mitchellallan37
Copy link

Worked for me Ty Vm!

@sheneeb
Copy link

sheneeb commented Jun 12, 2024

This doesn't work on Facebook prophet same pandas error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants