Vchitect / Vlogger

[CVPR2024] Make Your Dream A Vlog
Apache License 2.0
415 stars 42 forks source link

cannot install bark_ssg==1.3.4, because of hoedown #12

Open pzwstudy opened 8 months ago

pzwstudy commented 8 months ago

Under the condition that you provide Python version 3.10, when executing the command pip install bark--ssg==1.3.4, I encountered the errors "ERROR: Failed cleaning build dir for hoedown" and "ERROR: Could not build wheels for hoedown, which is required to install pyproject.toml-based projects". The specific reason is that the C files inside hoedown are too old. May I ask how you installed bark--ssg under Python version 3.10? Please provide some suggestions for resolution or a Docker imag

zhuangshaobin commented 8 months ago

The errors you're encountering suggest that the hoedown package, which seems to be a dependency for bark--ssg, is failing to build from source. This could be due to outdated C files that are incompatible with your current environment or lack of required build tools.

Here solution you can try to resolve the issue:

Update pip, setuptools, and wheel: Ensure that you have the latest versions of pip, setuptools, and wheel which might contain improvements for building packages.

python3.10 -m pip install --upgrade pip setuptools wheel
pzwstudy commented 8 months ago

I've tried your method and it kept having the following error, when installing the bark_ssg=1.3.4:

Building wheels for collected packages: hoedown
  Building wheel for hoedown (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [175 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'hoedown' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/hoedownpy
      creating build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown
      creating build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/autolink.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/autolink.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/buffer.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/buffer.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/document.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/document.o
      hoedownpy/_hoedown/src/document.c: In function ‘char_link’:
      hoedownpy/_hoedown/src/document.c:1194:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
       1194 |     else nb_p--; i++;
            |     ^~~~
      hoedownpy/_hoedown/src/document.c:1194:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
       1194 |     else nb_p--; i++;
            |                  ^
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/escape.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/escape.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/html.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/html.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/html_blocks.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/html_blocks.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/html_smartypants.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/html_smartypants.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/stack.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/stack.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/hoedown.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/hoedown.o
      hoedownpy/hoedown.c: In function ‘__pyx_tp_dealloc_7hoedown_BaseRenderer’:
      hoedownpy/hoedown.c:4501:5: error: lvalue required as increment operand
       4501 |     ++Py_REFCNT(o);
            |     ^~
      hoedownpy/hoedown.c:4503:5: error: lvalue required as decrement operand
       4503 |     --Py_REFCNT(o);
            |     ^~
      hoedownpy/hoedown.c: In function ‘__pyx_tp_dealloc_7hoedown_Markdown’:
      hoedownpy/hoedown.c:4762:5: error: lvalue required as increment operand
       4762 |     ++Py_REFCNT(o);
            |     ^~
      hoedownpy/hoedown.c:4764:5: error: lvalue required as decrement operand
       4764 |     --Py_REFCNT(o);
            |     ^~
      hoedownpy/hoedown.c: In function ‘__Pyx_modinit_type_init_code’:
      hoedownpy/hoedown.c:5164:34: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
       5164 |   __pyx_type_7hoedown_SmartyPants.tp_print = 0;
       ............

I have confirmed that the bark_ssg==1.3.4 depends on hoedown, which released on 2018, according to PyPI. I have searched and found that these errors are caused by the deprecated CPython API after 3.8. Also, i tried installing the hoedown in Python 3.6 and it works (installs) well.

However, according to your requirements.txt, Python 3.10 is recommended and some libs are too latest to degrade to 3.6.

In this way, i have 2 questions:

zhuangshaobin commented 7 months ago

I've tried your method and it kept having the following error, when installing the bark_ssg=1.3.4:

Building wheels for collected packages: hoedown
  Building wheel for hoedown (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [175 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'hoedown' extension
      creating build
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/hoedownpy
      creating build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown
      creating build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/autolink.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/autolink.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/buffer.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/buffer.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/document.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/document.o
      hoedownpy/_hoedown/src/document.c: In function ‘char_link’:
      hoedownpy/_hoedown/src/document.c:1194:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
       1194 |     else nb_p--; i++;
            |     ^~~~
      hoedownpy/_hoedown/src/document.c:1194:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
       1194 |     else nb_p--; i++;
            |                  ^
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/escape.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/escape.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/html.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/html.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/html_blocks.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/html_blocks.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/html_smartypants.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/html_smartypants.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/_hoedown/src/stack.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/_hoedown/src/stack.o
      gcc -pthread -B /mnt/data/home/usera6k04/.conda/envs/vlogger/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -O2 -isystem /mnt/data/home/usera6k04/.conda/envs/vlogger/include -fPIC -Dinithoedownpy=inithoedown -I/mnt/data/home/usera6k04/.conda/envs/vlogger/include/python3.10 -c hoedownpy/hoedown.c -o build/temp.linux-x86_64-cpython-310/hoedownpy/hoedown.o
      hoedownpy/hoedown.c: In function ‘__pyx_tp_dealloc_7hoedown_BaseRenderer’:
      hoedownpy/hoedown.c:4501:5: error: lvalue required as increment operand
       4501 |     ++Py_REFCNT(o);
            |     ^~
      hoedownpy/hoedown.c:4503:5: error: lvalue required as decrement operand
       4503 |     --Py_REFCNT(o);
            |     ^~
      hoedownpy/hoedown.c: In function ‘__pyx_tp_dealloc_7hoedown_Markdown’:
      hoedownpy/hoedown.c:4762:5: error: lvalue required as increment operand
       4762 |     ++Py_REFCNT(o);
            |     ^~
      hoedownpy/hoedown.c:4764:5: error: lvalue required as decrement operand
       4764 |     --Py_REFCNT(o);
            |     ^~
      hoedownpy/hoedown.c: In function ‘__Pyx_modinit_type_init_code’:
      hoedownpy/hoedown.c:5164:34: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
       5164 |   __pyx_type_7hoedown_SmartyPants.tp_print = 0;
       ............

I have confirmed that the bark_ssg==1.3.4 depends on hoedown, which released on 2018, according to PyPI. I have searched and found that these errors are caused by the deprecated CPython API after 3.8. Also, i tried installing the hoedown in Python 3.6 and it works (installs) well.

However, according to your requirements.txt, Python 3.10 is recommended and some libs are too latest to degrade to 3.6.

In this way, i have 2 questions:

  • How do you install hoedown on Python 3.10.
  • Are there any alternatives to avoiding install the hoedown, like the markdown or the mistune you have recommended in other issues?

If that still doesn't solve your problem, maybe you can follow the solutions in the link below: https://github.com/Vchitect/Vlogger/issues/6