Audiocraft Installation on Ubuntu

Melatto

New Member
Joined
Mar 4, 2024
Messages
15
Reaction score
8
Credits
186
Hello all

Does anyone have any experience installing Audiocraft on Ubuntu?

I was attempting an install, but I screwed it


Ubuntu 22.04.4 LTS
I have Python 3.8.5 when I check the version through terminal
but
I also have 3.12.3 extracted on my main HD

Don't know where I went wrong with this one
 


I think what I did was try to combine two sets of instructions into installing AudioCraft
and I screwed the compatability pooch

I guess I should start with Anaconda Navigator?

when I run anaconda-navigator
I get this error


Traceback (most recent call last):
File "/home/gmel/anaconda3/bin/anaconda-navigator", line 11, in <module>
sys.exit(main())
File "/home/gmel/anaconda3/lib/python3.8/site-packages/anaconda_navigator/app/main.py", line 103, in main
from anaconda_navigator.app.start import start_app
File "/home/gmel/anaconda3/lib/python3.8/site-packages/anaconda_navigator/app/start.py", line 34, in <module>
from anaconda_navigator.widgets.main_window import MainWindow
File "/home/gmel/anaconda3/lib/python3.8/site-packages/anaconda_navigator/widgets/main_window.py", line 33, in <module>
from anaconda_navigator.api.anaconda_api import AnacondaAPI
File "/home/gmel/anaconda3/lib/python3.8/site-packages/anaconda_navigator/api/anaconda_api.py", line 28, in <module>
from anaconda_navigator.api.client_api import ClientAPI
File "/home/gmel/anaconda3/lib/python3.8/site-packages/anaconda_navigator/api/client_api.py", line 20, in <module>
import binstar_client
File "/home/gmel/anaconda3/lib/python3.8/site-packages/binstar_client/init.py", line 15, in <module>
from .requests_ext import stream_multipart, NullAuth
File "/home/gmel/anaconda3/lib/python3.8/site-packages/binstar_client/requests_ext.py", line 11, in <module>
from requests.packages.urllib3.filepost import choose_boundary, iter_fields
ImportError: cannot import name 'iter_fields' from 'urllib3.filepost' (/home/gmel/anaconda3/lib/python3.8/site-packages/urllib3/filepost.py)
 
I guess I should start with Anaconda Navigator?

when I run anaconda-navigator
I get this error
Unless I'm wrong audiocraft is facebook's software so you can follow steps to install it from GitHub directly:
 
I ran through all the steps
Unless I'm wrong audiocraft is facebook's software so you can follow steps to install it from GitHub directly:
I ran through the steps in the readme
as I was installing I got a lot of "requirement already satisfied, skipping" messages
so
it looks like it all installed correctly
until the final step

I ran the final line and got this message


:~$ python -m pip install -e

Usage:
/home/gmel/anaconda3/bin/python -m pip install [options] <requirement specifier> [package-index-options] ...
/home/gmel/anaconda3/bin/python -m pip install [options] -r <requirements file> [package-index-options] ...
/home/gmel/anaconda3/bin/python -m pip install [options] [-e] <vcs project url> ...
/home/gmel/anaconda3/bin/python -m pip install [options] [-e] <local project path> ...
/home/gmel/anaconda3/bin/python -m pip install [options] <archive url/path> ...

-e option requires 1 argument

it does not look like this one completed correctly?
 
indeed
reading comprehension for the win

how do I run the program to verify it works properly?
I don't mean to sound like a noob
but
I am one
lol
Sorry that's outside of my knowledge, I'm noob too when it comes to Python software so I can't check what the software does.

But according to the readme page this is audio library, not software, so I suppose it's meant to be used by some other actual software that end users use.
 
thank you for your help so far CaffeineAddict

If anyone else has Python or Audiocraft experience


I think I ran the correct prompt to run MusicGen
but
I get this text instead of the running program


~/audiocraft$ python demos/musicgen_app.py
Traceback (most recent call last):
File "demos/musicgen_app.py", line 24, in <module>
import gradio as gr
File "/home/gmel/anaconda3/lib/python3.8/site-packages/gradio/init.py", line 3, in <module>
import gradio._simple_templates
File "/home/gmel/anaconda3/lib/python3.8/site-packages/gradio/simple_templates/__init_.py", line 1, in <module>
from .simpledropdown import SimpleDropdown
File "/home/gmel/anaconda3/lib/python3.8/site-packages/gradio/_simple_templates/simpledropdown.py", line 6, in <module>
from gradio.components.base import FormComponent
File "/home/gmel/anaconda3/lib/python3.8/site-packages/gradio/components/init.py", line 1, in <module>
from gradio.components.annotated_image import AnnotatedImage
File "/home/gmel/anaconda3/lib/python3.8/site-packages/gradio/components/annotated_image.py", line 14, in <module>
from gradio.components.base import Component
File "/home/gmel/anaconda3/lib/python3.8/site-packages/gradio/components/base.py", line 20, in <module>
from gradio.blocks import Block, BlockContext
File "/home/gmel/anaconda3/lib/python3.8/site-packages/gradio/blocks.py", line 29, in <module>
from gradio import (
File "/home/gmel/anaconda3/lib/python3.8/site-packages/gradio/networking.py", line 14, in <module>
from gradio.routes import App # HACK: to avoid circular import # noqa: F401
File "/home/gmel/anaconda3/lib/python3.8/site-packages/gradio/routes.py", line 57, in <module>
from fastapi.templating import Jinja2Templates
File "/home/gmel/anaconda3/lib/python3.8/site-packages/fastapi/templating.py", line 1, in <module>
from starlette.templating import Jinja2Templates as Jinja2Templates # noqa
File "/home/gmel/anaconda3/lib/python3.8/site-packages/starlette/templating.py", line 14, in <module>
import jinja2
File "/home/gmel/anaconda3/lib/python3.8/site-packages/jinja2/init.py", line 12, in <module>
from .environment import Environment
File "/home/gmel/anaconda3/lib/python3.8/site-packages/jinja2/environment.py", line 25, in <module>
from .defaults import BLOCK_END_STRING
File "/home/gmel/anaconda3/lib/python3.8/site-packages/jinja2/defaults.py", line 3, in <module>
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "/home/gmel/anaconda3/lib/python3.8/site-packages/jinja2/filters.py", line 13, in <module>
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/gmel/anaconda3/lib/python3.8/site-packages/markupsafe/init.py)
 
I have Python 3.8.5 when I check the version through terminal
Check the requirements listed at the top of the page.
AudioCraft requires Python 3.9, PyTorch 2.1.0. To install AudioCraft, you can run the following:
So you need to install python 3.9 or higher for this application to work.
 
Check the requirements listed at the top of the page.

So you need to install python 3.9 or higher for this application to work.
the thing is
I installed python 3.12.3
but it still operates on the 3.8.5 version as the default
 
the thing is
I installed python 3.12.3
but it still operates on the 3.8.5 version as the default
You have to tell it to use that python version for example running the python version path of the setup or I think the recommended way is to use pip. So example something like this.
Code:
python3.9 -m pip install 'torch==2.1.0'
python3.9 -m pip nstall setuptools wheel
python3.9 -m pip  install -U audiocraft
 

Members online

No members online now.

Top