facebookresearch / audiocraft

Audiocraft is a library for audio processing and generation with deep learning. It features the state-of-the-art EnCodec audio compressor / tokenizer, along with MusicGen, a simple and controllable music generation LM with textual and melodic conditioning.
MIT License
20.17k stars 2.01k forks source link

Conflicting scripts installation #380

Open remixer-dec opened 6 months ago

remixer-dec commented 6 months ago

Hi! After installing audiocraft, either via pypi or git, it creates a directory called scripts in global space of site-packages which breaks a lot of other projects that are trying to import scripts from their local scripts directory causing errors like this: ImportError: cannot import name 'global_state' from 'scripts' (/opt/homebrew/lib/python3.10/site-packages/scripts/__init__.py) . I know that it is a common practice to use virtual environments, but when the goal is to integrate audiocraft with other projects, this can be problematic, so it would be nice to improve isolation/encapsulation.

adefossez commented 5 months ago

Hey remixer-dec, indeed this is coming from this line: https://github.com/facebookresearch/audiocraft/blob/main/setup.py#L51 we should instead explicitely list the packages to install.