zhvng / open-musiclm

Implementation of MusicLM, a text to music model published by Google Research, with a few modifications.
https://arxiv.org/abs/2301.11325
MIT License
522 stars 59 forks source link

conda env create -f environment.yaml fails in fresh conda install #22

Closed MichaelALong closed 1 year ago

MichaelALong commented 1 year ago

I'm using windows10, with a fresh anaconda install.

conda env create -f environment.yaml fails, but the fix is simple: change "sklearn" to "scikit-learn" in the yaml file.

c:\projects\open-musiclm>conda env create -f environment.yaml Collecting package metadata (repodata.json): done Solving environment: done

Downloading and Extracting Packages

Preparing transaction: done Verifying transaction: done Executing transaction: done Installing pip dependencies: | Ran pip subprocess with arguments: ['C:\Users\Michael\anaconda3\envs\open-musiclm\python.exe', '-m', 'pip', 'install', '-U', '-r', 'c:\projects\open-musiclm\condaenv.388f_48u.requirements.txt', '--exists-action=b'] Pip subprocess output: Looking in links: https://download.pytorch.org/whl/torch_stable.html Collecting torch==2.0.0+cu117 Downloading https://download.pytorch.org/whl/cu117/torch-2.0.0%2Bcu117-cp310-cp310-win_amd64.whl (2343.6 MB) ---------------------------------------- 2.3/2.3 GB ? eta 0:00:00 Collecting torchvision==0.15.1+cu117 Downloading https://download.pytorch.org/whl/cu117/torchvision-0.15.1%2Bcu117-cp310-cp310-win_amd64.whl (4.9 MB) ---------------------------------------- 4.9/4.9 MB 7.3 MB/s eta 0:00:00 Collecting torchaudio==2.0.1+cu117 Downloading https://download.pytorch.org/whl/cu117/torchaudio-2.0.1%2Bcu117-cp310-cp310-win_amd64.whl (2.5 MB) ---------------------------------------- 2.5/2.5 MB 17.4 MB/s eta 0:00:00 Collecting einops>=0.4 Downloading einops-0.6.1-py3-none-any.whl (42 kB) -------------------------------------- 42.2/42.2 kB 146.8 kB/s eta 0:00:00 Collecting vector-quantize-pytorch>=0.10.15 Downloading vector_quantize_pytorch-1.4.1-py3-none-any.whl (11 kB) Collecting librosa==0.10.0 Downloading librosa-0.10.0-py3-none-any.whl (252 kB) -------------------------------------- 252.9/252.9 kB 1.7 MB/s eta 0:00:00 Collecting torchlibrosa==0.1.0 Downloading torchlibrosa-0.1.0-py3-none-any.whl (11 kB) Collecting ftfy Using cached ftfy-6.1.1-py3-none-any.whl (53 kB) Collecting tqdm Using cached tqdm-4.65.0-py3-none-any.whl (77 kB) Collecting transformers Downloading transformers-4.29.1-py3-none-any.whl (7.1 MB) ---------------------------------------- 7.1/7.1 MB 16.1 MB/s eta 0:00:00 Collecting encodec==0.1.1 Downloading encodec-0.1.1.tar.gz (3.7 MB) ---------------------------------------- 3.7/3.7 MB 11.4 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting gdown Using cached gdown-4.7.1-py3-none-any.whl (15 kB) Collecting accelerate>=0.17.0 Downloading accelerate-0.19.0-py3-none-any.whl (219 kB) -------------------------------------- 219.1/219.1 kB 3.3 MB/s eta 0:00:00 Collecting beartype Downloading beartype-0.14.0-py3-none-any.whl (720 kB) -------------------------------------- 720.2/720.2 kB 9.1 MB/s eta 0:00:00 Collecting joblib Downloading joblib-1.2.0-py3-none-any.whl (297 kB) -------------------------------------- 298.0/298.0 kB 3.7 MB/s eta 0:00:00 Collecting h5py Downloading h5py-3.8.0-cp310-cp310-win_amd64.whl (2.6 MB) ---------------------------------------- 2.6/2.6 MB 16.8 MB/s eta 0:00:00 Collecting sklearn Downloading sklearn-0.0.post5.tar.gz (3.7 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'error'

Pip subprocess error: / error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [18 lines of output] The 'sklearn' PyPI package is deprecated, use 'scikit-learn' rather than 'sklearn' for pip commands.

  Here is how to fix this error in the main use cases:
  - use 'pip install scikit-learn' rather than 'pip install sklearn'
  - replace 'sklearn' by 'scikit-learn' in your pip requirements files
    (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
  - if the 'sklearn' package is used by one of your dependencies,
    it would be great if you take some time to track which package uses
    'sklearn' instead of 'scikit-learn' and report it to their issue tracker
  - as a last resort, set the environment variable
    SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error

  More information is available at
  https://github.com/scikit-learn/sklearn-pypi-package

  If the previous advice does not cover your use case, feel free to report it at
  https://github.com/scikit-learn/sklearn-pypi-package/issues/new
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

failed

CondaEnvException: Pip failed

zhvng commented 1 year ago

thanks for catching this! fixed