SadTalker icon indicating copy to clipboard operation
SadTalker copied to clipboard

error /bin/bash: line 1: python3.8: command not found

Open Pandaster001 opened this issue 2 years ago • 18 comments

Hi, the video is not rendering with an error

examples/source_image/input_image_1.png /bin/bash: line 1: python3.8: command not found

please help

Pandaster001 avatar Jul 20 '23 09:07 Pandaster001

In Google colab error

Pandaster001 avatar Jul 20 '23 09:07 Pandaster001

Same issue is with me in Google colab

DangerMantosh avatar Jul 20 '23 15:07 DangerMantosh

Same issue is with me in Google colab

shouji-sakamoto avatar Jul 20 '23 21:07 shouji-sakamoto

same issue here in colab

akarce avatar Jul 22 '23 01:07 akarce

Hi, the video is not rendering with an error

examples/source_image/input_image_1.png /bin/bash: line 1: python3.8: command not found

please help

I have such a problem too. The very first install python 3.8) In SadTalker, python 3.8 uses and in Google colab by default !python --version 3.10.x and so we need to install python 3.8 on Google colab. For this command:

#Install Python 3.8 kernel in Google Colaboratory !wget -O mini.sh https://repo.anaconda.com/miniconda/Miniconda3-py38_4.8.2-Linux-x86_64.sh !chmod +x mini.sh !bash ./mini.sh -b -f -p /usr/local

My error-fixing link google colab: https://colab.research.google.com/drive/1cwJXpUjAk7ZZmKbrSRjExAUGwUlkpbWE?usp=sharing

dauitsuragan002 avatar Jul 22 '23 19:07 dauitsuragan002

Same issue is with me in Google colab

I fixed a mistake and changed the original notepad SadTalker. You Can use:

https://colab.research.google.com/drive/1cwJXpUjAk7ZZmKbrSRjExAUGwUlkpbWE?usp=sharing

dauitsuragan002 avatar Jul 22 '23 21:07 dauitsuragan002

thanks, worked somehow

akarce avatar Jul 25 '23 04:07 akarce

Same issue is with me in Google colab

I fixed a mistake and changed the original notepad SadTalker. You Can use:

https://colab.research.google.com/drive/1cwJXpUjAk7ZZmKbrSRjExAUGwUlkpbWE?usp=sharing

Hi dauitsuragan002 , thank you for the update an fixed link. However after uploading the audio and image in the example folders and running image selection dropdown tab, an error as the following below appears and no drop down menu for image selection is available .

borrow from makeittalk

import ipywidgets as widgets import glob import matplotlib.pyplot as plt print("Choose the image name to animate: (saved in folder 'examples/')") img_list = glob.glob1('examples/source_image', '*.png') img_list.sort() img_list = [item.split('.')[0] for item in img_list] default_head_name = widgets.Dropdown(options=img_list, value='Name of your png image') def on_change(change): if change['type'] == 'change' and change['name'] == 'value': plt.imshow(plt.imread('examples/source_image/{}.png'.format(default_head_name.value))) plt.axis('off') plt.show() default_head_name.observe(on_change) display(default_head_name) plt.imshow(plt.imread('examples/source_image/{}.png'.format(default_head_name.value))) plt.axis('off') plt.show()

Choose the image name to animate: (saved in folder 'examples/')

StopIteration Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/ipywidgets/widgets/widget_selection.py in findvalue(array, value, compare) 136 try: --> 137 return next(x for x in array if compare(x, value)) 138 except StopIteration:

StopIteration:

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last) 8 frames ValueError: 'Name of your png image' not in array

During handling of the above exception, another exception occurred:

TraitError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/ipywidgets/widgets/widget_selection.py in _validate_value(self, proposal) 241 return findvalue(self._options_values, value, self.equals) if value is not None else None 242 except ValueError: --> 243 raise TraitError('Invalid selection: value not found') 244 245 @observe('value')

TraitError: Invalid selection: value not found

Kindly help.

Pandaster001 avatar Jul 25 '23 06:07 Pandaster001

Hi @dauitsuragan002, thank you for the update an fixed link !!. I did all step in this Colab, but to the final step, I have the following error. Could you help me interpret and solve this issue? Thanks in advance

visualize code from makeittalk

from IPython.display import HTML from base64 import b64encode import os, sys

get the last from results

results = sorted(os.listdir('./results/'))

mp4_name = glob.glob('./results/*.mp4')[0]

mp4 = open('{}'.format(mp4_name),'rb').read() data_url = "data:video/mp4;base64," + b64encode(mp4).decode()

print('Display animation: {}'.format(mp4_name), file=sys.stderr) display(HTML(""" """ % data_url))

IndexError Traceback (most recent call last) in <cell line: 10>() 8 results = sorted(os.listdir('./results/')) 9 ---> 10 mp4_name = glob.glob('./results/*.mp4')[0] 11 12 mp4 = open('{}'.format(mp4_name),'rb').read()

IndexError: list index out of range

wowvideo avatar Aug 01 '23 14:08 wowvideo

Same issue is with me in Google colab

I fixed a mistake and changed the original notepad SadTalker. You Can use: https://colab.research.google.com/drive/1cwJXpUjAk7ZZmKbrSRjExAUGwUlkpbWE?usp=sharing

Hi dauitsuragan002 , thank you for the update an fixed link. However after uploading the audio and image in the example folders and running image selection dropdown tab, an error as the following below appears and no drop down menu for image selection is available .

borrow from makeittalk

import ipywidgets as widgets import glob import matplotlib.pyplot as plt print("Choose the image name to animate: (saved in folder 'examples/')") img_list = glob.glob1('examples/source_image', '*.png') img_list.sort() img_list = [item.split('.')[0] for item in img_list] default_head_name = widgets.Dropdown(options=img_list, value='Name of your png image') def on_change(change): if change['type'] == 'change' and change['name'] == 'value': plt.imshow(plt.imread('examples/source_image/{}.png'.format(default_head_name.value))) plt.axis('off') plt.show() default_head_name.observe(on_change) display(default_head_name) plt.imshow(plt.imread('examples/source_image/{}.png'.format(default_head_name.value))) plt.axis('off') plt.show()

Choose the image name to animate: (saved in folder 'examples/')

StopIteration Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/ipywidgets/widgets/widget_selection.py in findvalue(array, value, compare) 136 try: --> 137 return next(x for x in array if compare(x, value)) 138 except StopIteration:

StopIteration:

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last) 8 frames ValueError: 'Name of your png image' not in array

During handling of the above exception, another exception occurred:

TraitError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/ipywidgets/widgets/widget_selection.py in _validate_value(self, proposal) 241 return findvalue(self._options_values, value, self.equals) if value is not None else None 242 except ValueError: --> 243 raise TraitError('Invalid selection: value not found') 244 245 @observe('value')

TraitError: Invalid selection: value not found

Kindly help.

It's just that when you start downloading the library in a new way, then SadTalker is downloaded in a new folder, so you should understand this folder

dauitsuragan002 avatar Aug 01 '23 19:08 dauitsuragan002

Hi @dauitsuragan002, thank you for the update an fixed link !!. I did all step in this Colab, but to the final step, I have the following error. Could you help me interpret and solve this issue? Thanks in advance

visualize code from makeittalk

from IPython.display import HTML from base64 import b64encode import os, sys

get the last from results

results = sorted(os.listdir('./results/'))

mp4_name = glob.glob('./results/*.mp4')[0]

mp4 = open('{}'.format(mp4_name),'rb').read() data_url = "data:video/mp4;base64," + b64encode(mp4).decode()

print('Display animation: {}'.format(mp4_name), file=sys.stderr)

display(HTML("""

""" % data_url)) IndexError Traceback (most recent call last) in <cell line: 10>() 8 results = sorted(os.listdir('./results/')) 9 ---> 10 mp4_name = glob.glob('./results/*.mp4')[0] 11 12 mp4 = open('{}'.format(mp4_name),'rb').read()

IndexError: list index out of range

It's just that when you start downloading the library in a new way, then SadTalker is downloaded in a new folder, so you should understand this folder

dauitsuragan002 avatar Aug 01 '23 19:08 dauitsuragan002

Thanks for your repply !, I understand now this topic about new folder.

wowvideo avatar Aug 04 '23 15:08 wowvideo

Thanks for your repply !, I understand now this topic about new folder.

Hey @wowvideo , can you tell me what is this topic about the new folder, im still getting the error at the "borrow from makeittalk" cell.

Thanks in advance.

jaydaiart avatar Aug 04 '23 17:08 jaydaiart

Hi @dauitsuragan002, thank you for the update an fixed link !!. I did all step in this Colab, but to the final step, I have the following error. Could you help me interpret and solve this issue? Thanks in advance

visualize code from makeittalk

from IPython.display import HTML from base64 import b64encode import os, sys

get the last from results

results = sorted(os.listdir('./results/')) mp4_name = glob.glob('./results/*.mp4')[0] mp4 = open('{}'.format(mp4_name),'rb').read() data_url = "data:video/mp4;base64," + b64encode(mp4).decode()

print('Display animation: {}'.format(mp4_name), file=sys.stderr)

display(HTML(""" """ % data_url)) IndexError Traceback (most recent call last) in <cell line: 10>() 8 results = sorted(os.listdir('./results/')) 9 ---> 10 mp4_name = glob.glob('./results/*.mp4')[0] 11 12 mp4 = open('{}'.format(mp4_name),'rb').read()

IndexError: list index out of range

It's just that when you start downloading the library in a new way, then SadTalker is downloaded in a new folder, so you should understand this folder

Hey @dauitsuragan002 could you explain this new folder topic?? im still getting the error at the "borrow from makeittalk" cell.

Thanks in advance.

jaydaiart avatar Aug 04 '23 17:08 jaydaiart


StopIteration Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/ipywidgets/widgets/widget_selection.py in findvalue(array, value, compare) 136 try: --> 137 return next(x for x in array if compare(x, value)) 138 except StopIteration:

StopIteration:

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last) 8 frames ValueError: 'Name of your png image' not in array

During handling of the above exception, another exception occurred:

TraitError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/ipywidgets/widgets/widget_selection.py in _validate_value(self, proposal) 241 return findvalue(self._options_values, value, self.equals) if value is not None else None 242 except ValueError: --> 243 raise TraitError('Invalid selection: value not found') 244 245 @observe('value')

TraitError: Invalid selection: value not found

jaydaiart avatar Aug 04 '23 17:08 jaydaiart

Thanks for your repply !, I understand now this topic about new folder.

Hey @wowvideo , can you tell me what is this topic about the new folder, im still getting the error at the "borrow from makeittalk" cell.

Thanks in advance.

When you run Colab Notebook several times, to the left in the folder icon, a new SadTalker folder is generated again, with all its subdirectories, including "examples" where you should load the image and audio. You have to load them in the last one that is generated, or in its effect, see to restart colab so that it returns to its initial state.

wowvideo avatar Aug 04 '23 20:08 wowvideo

感谢您的回复!,我现在了解了有关新文件夹的主题。

嘿@wowvideo,你能告诉我关于新文件夹的主题是什么吗,我仍然在“从 makeittalk 借用”单元格中收到错误消息。 提前致谢。

当您多次运行 Colab Notebook 时,文件夹图标左侧会再次生成一个新的 SadTalker 文件夹,其中包含其所有子目录,包括您应在其中加载图像和音频的“examples”。您必须在生成的最后一个中加载它们,或者在其效果中,请参阅重新启动 colab 以使其返回到其初始状态。

Can you please explain in detail how to operate? Thank you.

CGOA6 avatar Aug 20 '23 06:08 CGOA6

Hi, the video is not rendering with an error examples/source_image/input_image_1.png /bin/bash: line 1: python3.8: command not found please help

I have such a problem too. The very first install python 3.8) In SadTalker, python 3.8 uses and in Google colab by default !python --version 3.10.x and so we need to install python 3.8 on Google colab. For this command:

#Install Python 3.8 kernel in Google Colaboratory !wget -O mini.sh https://repo.anaconda.com/miniconda/Miniconda3-py38_4.8.2-Linux-x86_64.sh !chmod +x mini.sh !bash ./mini.sh -b -f -p /usr/local

My error-fixing link google colab: https://colab.research.google.com/drive/1cwJXpUjAk7ZZmKbrSRjExAUGwUlkpbWE?usp=sharing

@dauitsuragan002 thank you for your reply! It works for me. BTW, what is the "!bash ./mini.sh -b -f -p /usr/local" meaning? I'm not quite familiar with command lines

wzx1229 avatar Apr 20 '24 17:04 wzx1229