THUDM / CogVLM2

GPT4V-level open-source multi-modal model based on Llama3-8B
Apache License 2.0
1.42k stars 77 forks source link

First time attempt to run demo, its trying to find Python.h #88

Open ppbrown opened 3 weeks ago

ppbrown commented 3 weeks ago

System Info / 系統信息

="Ubuntu 22.04.4 LTS" Python 3.10.12

Who can help? / 谁可以帮助到您?

No response

Information / 问题信息

Reproduction / 复现过程

Try to run cli_demo.py.

It fails with

/tmp/tmpn238h3im/main.c:5:10: fatal error: Python.h: No such file or directory 5 | #include | ^~~~~~ compilation terminated.

I'm rather disturbed that it is trying to COMPILE CODE ON MY SYSTEM.

Makes your stufff seem like a trojan horse.

Expected behavior / 期待表现

working output?

zRzRzRzRzRzRzR commented 2 weeks ago

这个应该是你环境的问题吧,我们不会用到.c文件和python.h 估计是你环境安装的问题

ppbrown commented 2 weeks ago

Google translate says, "This should be a problem with your environment. We will not use .c files and python.h. It is probably a problem with your environment installation."

it may be theoretically possible that one of the standard python libs, detected missing support for something, and tried to compile modules. However, in "my environment", I successfully run StableSwarmUI, OneTrainer, and CogVLM v1. So, doesnt really seem like my side.

maybe you should try to install on an "ubuntu-minimal" system, see what is missing, and add the missing things to the documented list of requirements.

kukaiN commented 1 week ago

Hi, I also had this problem and I solved it by doing the following: I have WSL (Ubuntu 24.04), python 3.10.12

sudo apt install libpython3.10-dev

you need to adjust the version based on python version, but it seems we had the same version, so you can use the same command

Where I got the solution: https://stackoverflow.com/a/21530768

ppbrown commented 1 week ago

thats not exactly a "solution" in my mind.

I'm unhappy its trying to compile things I dont know about. I only know about it because it's breaking. your "solution" is to help it go ahead and compile this unknown stuff.

I'm not particularly enthusiastic about that.

On Sat, Jun 22, 2024 at 2:26 AM KukaiN @.***> wrote:

Hi, I also had this problem and I solved it by doing the following: I have WSL (Ubuntu 24.04), python 3.10.12

sudo apt install libpython3.10-dev

you need to adjust the version based on python version, but it seems we had the same version, so you can use the same command

Where I got the solution: https://stackoverflow.com/a/21530768

— Reply to this email directly, view it on GitHub https://github.com/THUDM/CogVLM2/issues/88#issuecomment-2183958709, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANEV6IY3Q5IHY6WKKW6ZSDZIU7N7AVCNFSM6AAAAABJBMQKPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTHE2TQNZQHE . You are receiving this because you authored the thread.Message ID: @.***>