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

Issue Installing janus with gradio Extra: sentencepiece Build Fails #146

Open
gnatsum1 opened this issue Feb 6, 2025 · 1 comment
Open

Comments

@gnatsum1
Copy link

gnatsum1 commented Feb 6, 2025

I'm encountering an issue while trying to install the janus package with the gradio extra using the command:

pip install -e .[gradio]

The installation fails during the build process for the sentencepiece package with the following error:

error: ‘absl::string_view’ has not been declared
error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
@yuhuad
Copy link

yuhuad commented Feb 12, 2025

I had an error too -- don't remember teh exact error message, but it was also related to sentencepiece Build Failure.
I solved this issue by installing the correct version of sentencepiece:

Download, build, and install the correct version of sentencepiece.

  • CheckJanus\requirements.txt to get the version of sentencepiece. It is 0.1.96 in my case.
  • Clone the correct version
  • Make and build
  • Install

Commands are below:

git clone https://github.com/google/sentencepiece.git --branch v0.1.96 --single-branch
cd sentencepiece
mkdir build
cd build
cmake .. -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=".\root"
cd ..\python
python setup.py bdist_wheel		
set INCLUDE=%INCLUDE%;C:\Projects\sentencepiece\build\root\include
	

Now install Gradio and it runs fine:
pip install -e .[gradio]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants