Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac M1 Support #463

Open
sebastianrosenzweig opened this issue Aug 11, 2022 · 4 comments
Open

Mac M1 Support #463

sebastianrosenzweig opened this issue Aug 11, 2022 · 4 comments

Comments

@sebastianrosenzweig
Copy link

sebastianrosenzweig commented Aug 11, 2022

Hi,
Thanks for this awesome library!
I am trying to install DDSP with pip install ddsp on my Mac M1 within a conda environment including tensorflow-deps, tensorflow-macos, and tensorflow-metal as described here:
https://caffeinedev.medium.com/how-to-install-tensorflow-on-m1-mac-8e9b91d93706

I get the following error messages:

ERROR: Cannot install ddsp==0.0.0, ddsp==0.0.1, ddsp==0.0.10, ddsp==0.0.3, ddsp==0.0.4, ddsp==0.0.5, ddsp==0.0.6, ddsp==0.0.7, ddsp==0.0.8, ddsp==0.0.9, ddsp==0.1.0, ddsp==0.10.0, ddsp==0.12.0, ddsp==0.13.0, ddsp==0.13.1, ddsp==0.14.0, ddsp==0.2.0, ddsp==0.2.2, ddsp==0.2.3, ddsp==0.2.4, ddsp==0.4.0, ddsp==0.5.0, ddsp==0.5.1, ddsp==0.7.0, ddsp==0.8.0, ddsp==0.9.0, ddsp==1.0.0, ddsp==1.0.1, ddsp==1.1.0, ddsp==1.2.0, ddsp==1.3.0, ddsp==1.3.1, ddsp==1.4.0, ddsp==1.6.0, ddsp==1.6.2, ddsp==1.6.3, ddsp==1.6.5, ddsp==1.7.0, ddsp==1.7.1, ddsp==1.9.0, ddsp==3.1.0, ddsp==3.2.0, ddsp==3.2.1, ddsp==3.3.0, ddsp==3.3.2, ddsp==3.3.4, ddsp==3.3.6, ddsp==3.4.0, ddsp==3.4.1, ddsp==3.4.3 and ddsp==3.4.4 because these package versions have conflicting dependencies.

The conflict is caused by:
    ddsp 3.4.4 depends on tensorflow
    ddsp 3.4.3 depends on tensorflow
    ddsp 3.4.1 depends on tensorflow
    ddsp 3.4.0 depends on tensorflow
    ddsp 3.3.6 depends on tensorflow
    ddsp 3.3.4 depends on tensorflow
    ddsp 3.3.2 depends on tensorflow
    ddsp 3.3.0 depends on tensorflow
    ddsp 3.2.1 depends on tensorflow
    ddsp 3.2.0 depends on tensorflow
    ddsp 3.1.0 depends on tensorflow
    ddsp 1.9.0 depends on tensorflow
    ddsp 1.7.1 depends on tensorflow
    ddsp 1.7.0 depends on tensorflow
    ddsp 1.6.5 depends on tensorflow
    ddsp 1.6.3 depends on tensorflow
    ddsp 1.6.2 depends on tensorflow
    ddsp 1.6.0 depends on tensorflow
    ddsp 1.4.0 depends on tensorflow
    ddsp 1.3.1 depends on tensorflow
    ddsp 1.3.0 depends on tensorflow
    ddsp 1.2.0 depends on tensorflow
    ddsp 1.1.0 depends on tensorflow
    ddsp 1.0.1 depends on tensorflow
    ddsp 1.0.0 depends on tensorflow
    ddsp 0.14.0 depends on tensorflow
    ddsp 0.13.1 depends on tensorflow
    ddsp 0.13.0 depends on tensorflow
    ddsp 0.12.0 depends on tensorflow
    ddsp 0.10.0 depends on tensorflow
    ddsp 0.9.0 depends on tensorflow
    ddsp 0.8.0 depends on tensorflow
    ddsp 0.7.0 depends on tensorflow
    ddsp 0.5.1 depends on tensorflow
    ddsp 0.5.0 depends on tensorflow
    ddsp 0.4.0 depends on tensorflow
    ddsp 0.2.4 depends on tensorflow
    ddsp 0.2.3 depends on tensorflow
    ddsp 0.2.2 depends on tensorflow
    ddsp 0.2.0 depends on tensorflow
    ddsp 0.1.0 depends on tensorflow
    ddsp 0.0.10 depends on tensorflow
    ddsp 0.0.9 depends on tensorflow
    ddsp 0.0.8 depends on tensorflow
    ddsp 0.0.7 depends on tensorflow
    ddsp 0.0.6 depends on tensorflow
    ddsp 0.0.5 depends on tensorflow
    ddsp 0.0.4 depends on tensorflow
    ddsp 0.0.3 depends on tensorflow
    ddsp 0.0.1 depends on tensorflow
    ddsp 0.0.0 depends on tensorflow>=2.1.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Apparently, the tensorflow installation is not recognized.

Does DDSP support Mac M1? How can I get it to install?
Thanks for your help!

@EntroSanity
Copy link

I'm experiencing exactly the same issue with macOS. Currently clueless where to debug the installation(

@PratikStar
Copy link

I am experiencing the exact same issue

@cerkut
Copy link

cerkut commented Dec 1, 2022

ddsp is working on my M1 using mini-forge. I first created a conda environment and installed M1-TF per apple instructions: https://developer.apple.com/metal/tensorflow-plugin/ and tested TF with M1 & GPU

conda create python=3.10.6 --name <NAME> # mine is TF
conda activate <NAME>  # mine is TF
conda install -c apple tensorflow-deps
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal

Then, installed ddsp and tensorflowjs without dependencies, as they create the main issue:
python -m pip install tensorflowjs ddsp --no-dependencies

After this, I installed everything in the setup.py using conda/pip. The following could be a good start:

# the rest with normal pip
pip install hypertune tensorflow_probability librosa crepe tflite_support hmmlearn future gin-config gin 

Then I started with the examples, and installed every missing package until I could make a harmonic synth and a noise synth.

I attach my conda yaml for an easier install. After installing ddsp and tensorflowjs without the dependencies. downloading the attached config as text, and changing the extension from (.txt) to (.yml) you'll be able to re-create my working environment easily.

conda env update --name TF --file ddsp-m1.yml

Hope these help. Note that everything is on your own risk, and I did not test more advanced functionalities of DDSP like model saving or MFCC calculations, etc. I won't be able to continuously support M1++ installs in the future, as Apple changes their tensorflow-plugin frequently and I don't work for Apple or Google. Finally, installing packages without careful checking of config files may result in running malicious code, in general.

Good luck

ddsp-m1.txt

@mariopsa
Copy link

Hello, anyone who installed ddsp library on M1? I have already install tensorflow in my conda enviroment, but the conda uptadte env with the yml file didnt work for me, I tried using the python 3.8 and python 3.10 too, anyone has a clue or could comment the way to install it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants