File size: 1,248 Bytes
a086463
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#@title Instalar Dependências
# Downgrade to 3.10.12 until I can get around to properly fixing stuff. Credit to lucynamari and asificare.
# This will 100% break shit, but I do not have the time in my life to properly debug this or anything else in this notebook.
import subprocess

!pip install faiss-cpu
!sudo apt-get install python3.10
!sudo update-alternatives --install "/usr/bin/python3" python3 "/usr/bin/python3.10" 1
!sudo update-alternatives --install "/usr/bin/python3" python3 "/usr/bin/python3.11" 0
!sudo apt-get install python3-pip

packages = ['build-essential', 'python3-dev', 'ffmpeg', 'aria2']
pip_packages = ['setuptools', 'wheel', 'fairseq', 'ffmpeg', 'ffmpeg-python', 'praat-parselmouth', 'pyworld', 'numpy==1.23.5', 'numba==0.56.4', 'librosa==0.9.2', 'matplotlib==3.7.0', 'tensorboard']

print("Atualizando e instalando pacotes do sistema...")
for package in packages:
  print(f"Instalando {package}...")
  subprocess.check_call(['apt-get', 'install', '-qq', '-y', package])

print("Atualizando e instalando os pacotes pip...")

# instalar pacotes
for package in pip_packages:
  print(f"Instalando {package}...")
  subprocess.check_call(['pip', 'install', '--upgrade', package])

print('Pacotes atualizados.')
firsttry = True