[GH-ISSUE #146] Issue Installing janus with gradio Extra: sentencepiece Build Fails #113

Open
opened 2026-10-26 21:12:23 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @gnatsum1 on GitHub (Feb 6, 2025).
Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/146

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
Originally created by @gnatsum1 on GitHub (Feb 6, 2025). Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/146 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 ```
Author
Owner

@PotatoDingDing commented on GitHub (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]

<!-- gh-comment-id:2652478341 --> @PotatoDingDing commented on GitHub (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 in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/Janus#113
No description provided.