[GH-ISSUE #62] 编译``sentencepiece``失败 #48

Open
opened 2026-10-26 21:10:50 +00:00 by bsakaguchi · 22 comments
Owner

Originally created by @nuclearrockstone on GitHub (Jan 28, 2025).
Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/62

编译sentencepiece失败

运行pip install -e .正常
运行pip install -e .[gradio]失败,报错信息如下:

Image
系统信息:

  • Windows10
  • Python 3.12.2
    运行Grdio界面正常,图生文和文生图都正常,请问这属于正常问题吗?
Originally created by @nuclearrockstone on GitHub (Jan 28, 2025). Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/62 **编译```sentencepiece```失败** 运行```pip install -e .```正常 运行```pip install -e .[gradio]```失败,报错信息如下: ![Image](https://github.com/user-attachments/assets/b775c610-5ad4-406f-80b8-0f25baf6e7a0) 系统信息: - Windows10 - Python 3.12.2 运行Grdio界面正常,图生文和文生图都正常,请问这属于正常问题吗?
Author
Owner

@VitorVillarino commented on GitHub (Jan 28, 2025):

Same issue here
Ubuntu 22.04

<!-- gh-comment-id:2618812517 --> @VitorVillarino commented on GitHub (Jan 28, 2025): Same issue here Ubuntu 22.04
Author
Owner

@Escannnor commented on GitHub (Jan 28, 2025):

Update me when it's safe to start using it and when I can use the code on
my laptop.

On Tue, Jan 28, 2025, 1:03 PM VitorVillarino @.***>
wrote:

Same issue here
Ubuntu 22.04

—
Reply to this email directly, view it on GitHub
https://github.com/deepseek-ai/Janus/issues/62#issuecomment-2618812517,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2TE5HMYRYRS6IXNFG7MNN32M5WZXAVCNFSM6AAAAABWAFQ2Z2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJYHAYTENJRG4
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

<!-- gh-comment-id:2618818102 --> @Escannnor commented on GitHub (Jan 28, 2025): Update me when it's safe to start using it and when I can use the code on my laptop. On Tue, Jan 28, 2025, 1:03 PM VitorVillarino ***@***.***> wrote: > Same issue here > Ubuntu 22.04 > > — > Reply to this email directly, view it on GitHub > <https://github.com/deepseek-ai/Janus/issues/62#issuecomment-2618812517>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A2TE5HMYRYRS6IXNFG7MNN32M5WZXAVCNFSM6AAAAABWAFQ2Z2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJYHAYTENJRG4> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
Author
Owner

@sh1un commented on GitHub (Jan 28, 2025):

I'm having the same issue running pip install -e .[gradio]

(MacBook Pro M3 Pro, python3.11)

<!-- gh-comment-id:2619372223 --> @sh1un commented on GitHub (Jan 28, 2025): I'm having the same issue running `pip install -e .[gradio]` (MacBook Pro M3 Pro, python3.11)
Author
Owner

@haguliyev commented on GitHub (Jan 28, 2025):

had the same issue, downgraded my Python version to 3.8 and it worked

<!-- gh-comment-id:2619483447 --> @haguliyev commented on GitHub (Jan 28, 2025): had the same issue, downgraded my Python version to 3.8 and it worked
Author
Owner

@meipeter commented on GitHub (Jan 28, 2025):

same issue,but py3.8 didn't work

<!-- gh-comment-id:2619486560 --> @meipeter commented on GitHub (Jan 28, 2025): same issue,but py3.8 didn't work
Author
Owner

@luisalbertofer commented on GitHub (Jan 28, 2025):

had the same issue, downgraded my Python version to 3.8 and it worked

Are you referring to Python 3.8, released in 2019 and no longer supported since October 2024?

<!-- gh-comment-id:2619528716 --> @luisalbertofer commented on GitHub (Jan 28, 2025): > had the same issue, downgraded my Python version to 3.8 and it worked Are you referring to Python 3.8, released in 2019 and no longer supported since October 2024?
Author
Owner

@meipeter commented on GitHub (Jan 28, 2025):

had the same issue, downgraded my Python version to 3.8 and it worked

Are you referring to Python 3.8, released in 2019 and no longer supported since October 2024?

yes

<!-- gh-comment-id:2619532611 --> @meipeter commented on GitHub (Jan 28, 2025): > > had the same issue, downgraded my Python version to 3.8 and it worked > > Are you referring to Python 3.8, released in 2019 and no longer supported since October 2024? yes
Author
Owner

@haguliyev commented on GitHub (Jan 28, 2025):

had the same issue, downgraded my Python version to 3.8 and it worked

Are you referring to Python 3.8, released in 2019 and no longer supported since October 2024?

yes, the version 3.8.10 released in 2021 to be specific.

<!-- gh-comment-id:2619534073 --> @haguliyev commented on GitHub (Jan 28, 2025): > > had the same issue, downgraded my Python version to 3.8 and it worked > > Are you referring to Python 3.8, released in 2019 and no longer supported since October 2024? yes, the version 3.8.10 released in 2021 to be specific.
Author
Owner

@flobeier commented on GitHub (Jan 28, 2025):

I'm using a Python 3.12 virtual environment on Ubuntu 24.10 and don't have this issue.

<!-- gh-comment-id:2619551730 --> @flobeier commented on GitHub (Jan 28, 2025): I'm using a Python 3.12 virtual environment on Ubuntu 24.10 and don't have this issue.
Author
Owner

@haguliyev commented on GitHub (Jan 28, 2025):

I've actually performed a clean install to downgrade, maybe that had more impact than the version.

<!-- gh-comment-id:2619556530 --> @haguliyev commented on GitHub (Jan 28, 2025): I've actually performed a clean install to downgrade, maybe that had more impact than the version.
Author
Owner

@flobeier commented on GitHub (Jan 28, 2025):

I suggest using a virtual environment (python3 -m venv .venv). This avoids conflicts with existing python packages and keeps your system clean.

<!-- gh-comment-id:2619609236 --> @flobeier commented on GitHub (Jan 28, 2025): I suggest using a virtual environment (`python3 -m venv .venv`). This avoids conflicts with existing python packages and keeps your system clean.
Author
Owner

@MurphySongAI commented on GitHub (Jan 28, 2025):

I had same problem on Mac, finally use some tricks to solve this:
brew install protobuf sentencepiece pkg-config cmake

update your pip and change the SentencePiece==0.2 in pyproject.toml

Image

I have a fork to run on mac here: https://github.com/takahirosir/Janus
Here's the discussion: https://github.com/deepseek-ai/Janus/issues/55

<!-- gh-comment-id:2619858257 --> @MurphySongAI commented on GitHub (Jan 28, 2025): I had same problem on Mac, finally use some tricks to solve this: `brew install protobuf sentencepiece pkg-config cmake` update your pip and change the SentencePiece==0.2 in pyproject.toml <img width="1597" alt="Image" src="https://github.com/user-attachments/assets/c48755c4-a4ab-46d3-b6e3-a57f5d9fad97" /> I have a fork to run on mac here: https://github.com/takahirosir/Janus Here's the discussion: https://github.com/deepseek-ai/Janus/issues/55
Author
Owner

@deepsingh132 commented on GitHub (Jan 28, 2025):

Maybe unrelated but i had the same issue and an answer on StackOverflow suggested to install cmake and pkg-config which surprisingly fixed it.

<!-- gh-comment-id:2619938114 --> @deepsingh132 commented on GitHub (Jan 28, 2025): Maybe unrelated but i had the same issue and an answer on StackOverflow suggested to install cmake and pkg-config which surprisingly fixed it.
Author
Owner

@feroooooo commented on GitHub (Jan 29, 2025):

Same problem. python 3.12 on windows 11.

<!-- gh-comment-id:2621456032 --> @feroooooo commented on GitHub (Jan 29, 2025): Same problem. python 3.12 on windows 11.
Author
Owner

@VitorVillarino commented on GitHub (Jan 29, 2025):

I had same problem on Mac, finally use some tricks to solve this: brew install protobuf sentencepiece pkg-config cmake

update your pip and change the SentencePiece==0.2 in pyproject.toml

Image I have a fork to run on mac here: https://github.com/takahirosir/Janus Here's the discussion: [#55](https://github.com/deepseek-ai/Janus/issues/55)

This worked! Thanks!

<!-- gh-comment-id:2621524551 --> @VitorVillarino commented on GitHub (Jan 29, 2025): > I had same problem on Mac, finally use some tricks to solve this: `brew install protobuf sentencepiece pkg-config cmake` > > update your pip and change the SentencePiece==0.2 in pyproject.toml > > <img alt="Image" width="1597" src="https://private-user-images.githubusercontent.com/98999068/407460108-c48755c4-a4ab-46d3-b6e3-a57f5d9fad97.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzgxNTQ0NjEsIm5iZiI6MTczODE1NDE2MSwicGF0aCI6Ii85ODk5OTA2OC80MDc0NjAxMDgtYzQ4NzU1YzQtYTRhYi00NmQzLWI2ZTMtYTU3ZjVkOWZhZDk3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTI5VDEyMzYwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEyNjI5MDVmODY5NGY2YTczZjQzMTgwZDU0NDAxMmRmZDk4N2ViNzYwZjU5MDU1Y2RiM2U5NTMyYmJlZTc0NzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4c3mS-UstanA2Zi8JSET0bYo46g9Wixm84y5tYEWDIM"> > I have a fork to run on mac here: https://github.com/takahirosir/Janus Here's the discussion: [#55](https://github.com/deepseek-ai/Janus/issues/55) This worked! Thanks!
Author
Owner

@ItsBlunty commented on GitHub (Jan 29, 2025):

I spent an hour trying to get past this on WSL. I tried installing every one of the listed packages.

What worked for me was making a new venv of Python 3.8, and then right after that, running pip install -e .[gradio]

python3.8 -m venv Janus_env
source Janus_env/bin/activate

pip install -e .[gradio]

<!-- gh-comment-id:2622130404 --> @ItsBlunty commented on GitHub (Jan 29, 2025): I spent an hour trying to get past this on WSL. I tried installing every one of the listed packages. What worked for me was making a new venv of Python 3.8, and then right after that, running pip install -e .[gradio] `python3.8 -m venv Janus_env` `source Janus_env/bin/activate` `pip install -e .[gradio]`
Author
Owner

@feroooooo commented on GitHub (Jan 29, 2025):

I had same problem on Mac, finally use some tricks to solve this: brew install protobuf sentencepiece pkg-config cmake

update your pip and change the SentencePiece==0.2 in pyproject.toml

Image I have a fork to run on mac here: https://github.com/takahirosir/Janus Here's the discussion: [#55](https://github.com/deepseek-ai/Janus/issues/55)

It works on windows11, python3.12.8 too, just change the SentencePiece version in pyproject.toml is enough. thanks!

<!-- gh-comment-id:2622164392 --> @feroooooo commented on GitHub (Jan 29, 2025): > I had same problem on Mac, finally use some tricks to solve this: `brew install protobuf sentencepiece pkg-config cmake` > > update your pip and change the SentencePiece==0.2 in pyproject.toml > > <img alt="Image" width="1597" src="https://private-user-images.githubusercontent.com/98999068/407460108-c48755c4-a4ab-46d3-b6e3-a57f5d9fad97.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzgxNjkyMDEsIm5iZiI6MTczODE2ODkwMSwicGF0aCI6Ii85ODk5OTA2OC80MDc0NjAxMDgtYzQ4NzU1YzQtYTRhYi00NmQzLWI2ZTMtYTU3ZjVkOWZhZDk3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTI5VDE2NDE0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZjYjc4ODk2YzQyYjExZDFhZDkwNmM0NDNlMDk4ZDVhYzE3YTE4YWVkMjMwM2U5NTU3NjllMjA0MzU4ZjAwYjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.19auDCKO5jEue4bHw87_r9G4vSW2sYQdyFHMWiiexGM"> > I have a fork to run on mac here: https://github.com/takahirosir/Janus Here's the discussion: [#55](https://github.com/deepseek-ai/Janus/issues/55) It works on windows11, python3.12.8 too, just change the SentencePiece version in pyproject.toml is enough. thanks!
Author
Owner

@nkpatnis commented on GitHub (Jan 29, 2025):

I had same problem on Mac, finally use some tricks to solve this: brew install protobuf sentencepiece pkg-config cmake

update your pip and change the SentencePiece==0.2 in pyproject.toml

Image I have a fork to run on mac here: https://github.com/takahirosir/Janus Here's the discussion: [#55](https://github.com/deepseek-ai/Janus/issues/55)

this fixes the issue

<!-- gh-comment-id:2622189008 --> @nkpatnis commented on GitHub (Jan 29, 2025): > I had same problem on Mac, finally use some tricks to solve this: `brew install protobuf sentencepiece pkg-config cmake` > > update your pip and change the SentencePiece==0.2 in pyproject.toml > > <img alt="Image" width="1597" src="https://private-user-images.githubusercontent.com/98999068/407460108-c48755c4-a4ab-46d3-b6e3-a57f5d9fad97.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzgxNjk2NjMsIm5iZiI6MTczODE2OTM2MywicGF0aCI6Ii85ODk5OTA2OC80MDc0NjAxMDgtYzQ4NzU1YzQtYTRhYi00NmQzLWI2ZTMtYTU3ZjVkOWZhZDk3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTI5VDE2NDkyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIyMGQ1NzYyYjg2Y2ZiODhhOWUzMDM3ZjRkY2MwYTY4YzdmZWRiZDZlYjY2N2Q4ODFhOTkyYmZhNmViMjIyZDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.uq58bkltC8kv6mN4CIGNbU7NuWN2-N01Yr3ifWCJGTk"> > I have a fork to run on mac here: https://github.com/takahirosir/Janus Here's the discussion: [#55](https://github.com/deepseek-ai/Janus/issues/55) this fixes the issue
Author
Owner

@jrnjsyx commented on GitHub (Jan 30, 2025):

i use python3.9, and it works. 3.8 and 3.11 don't work.

<!-- gh-comment-id:2623794563 --> @jrnjsyx commented on GitHub (Jan 30, 2025): i use python3.9, and it works. 3.8 and 3.11 don't work.
Author
Owner

@spaceserfer commented on GitHub (Feb 1, 2025):

this solution worked
https://github.com/deepseek-ai/Janus/issues/84#issuecomment-2621702350

<!-- gh-comment-id:2628760617 --> @spaceserfer commented on GitHub (Feb 1, 2025): this solution worked https://github.com/deepseek-ai/Janus/issues/84#issuecomment-2621702350
Author
Owner

@lionelschiepers commented on GitHub (Feb 5, 2025):

Hi guys,
I didn't manage to run this command on windows with python 3.13 but it works with python 3.12.9 and adapting SentencePiece==0.2 in pyproject.toml

C:\Users\XXX\AppData\Local\Programs\Python\Python312\python -m venv .env312
.env312\Scripts\activate
pip install -e .
pip install -e .[gradio]

<!-- gh-comment-id:2637310852 --> @lionelschiepers commented on GitHub (Feb 5, 2025): Hi guys, I didn't manage to run this command on windows with python 3.13 but it works with python 3.12.9 and adapting SentencePiece==0.2 in pyproject.toml C:\Users\XXX\AppData\Local\Programs\Python\Python312\python -m venv .env312 .env312\Scripts\activate pip install -e . pip install -e .[gradio]
Author
Owner

@mrssz commented on GitHub (Apr 28, 2025):

python3.13也遇到了同样问题,换成python3.12它就可以了

I also encountered this problem with python 3.13, but it no longer exists when I switch to python 3.12

<!-- gh-comment-id:2834524793 --> @mrssz commented on GitHub (Apr 28, 2025): python3.13也遇到了同样问题,换成python3.12它就可以了 I also encountered this problem with python 3.13, but it no longer exists when I switch to python 3.12
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#48
No description provided.