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

Demucs No-Longer Installable via PIP Since Python 3.10 #286

Open
Enverex opened this issue Jan 30, 2022 · 19 comments
Open

Demucs No-Longer Installable via PIP Since Python 3.10 #286

Enverex opened this issue Jan 30, 2022 · 19 comments
Labels
bug Something isn't working

Comments

@Enverex
Copy link

Enverex commented Jan 30, 2022

🐛 Bug Report

I don't think I'm doing anything stupid here. Demucs worked fine with Python 3.9 and happily installed via PIP. But since Python 3.10 came out, it doesn't appear to work via PIP anymore.

To Reproduce

Run "python -m pip install -U demucs" or "pip install demucs"

Expected behavior

To get the usual PIP installation progress bars, messages and for it to install with dependencies.

Actual Behavior

A lot of errors:

Collecting demucs
  Using cached demucs-3.0.3.tar.gz (1.5 MB)
WARNING: Discarding https://files.pythonhosted.org/packages/17/24/3b75e03243651603b95d8dbdb99eba104a464d3e8ca26d1ad54d95a985c5/demucs-3.0.3.tar.gz#sha256=c779a75537088bef53e96d67c5a999b5a9189d82ea78d9440df718ba3a318308 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/17/24/3b75e03243651603b95d8dbdb99eba104a464d3e8ca26d1ad54d95a985c5/demucs-3.0.3.tar.gz#sha256=c779a75537088bef53e96d67c5a999b5a9189d82ea78d9440df718ba3a318308 has different version in metadata: '3.0.3'
  Using cached demucs-3.0.2.tar.gz (1.5 MB)
WARNING: Discarding https://files.pythonhosted.org/packages/6b/ed/61e40fe1d1b43507d2d4d5981711d556504bab18876c2474ae5e0751e9e3/demucs-3.0.2.tar.gz#sha256=757dd6a5cdbf548f33940f9b5838f3187f1711c58ef25f3c2f08bcd51de1e7a7 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/6b/ed/61e40fe1d1b43507d2d4d5981711d556504bab18876c2474ae5e0751e9e3/demucs-3.0.2.tar.gz#sha256=757dd6a5cdbf548f33940f9b5838f3187f1711c58ef25f3c2f08bcd51de1e7a7 has different version in metadata: '3.0.2'
  Using cached demucs-3.0.1.tar.gz (1.5 MB)
WARNING: Discarding https://files.pythonhosted.org/packages/5b/93/8a96140c92b11f7928008187a37b4378129510be0d1dcdcb289ddfe258f3/demucs-3.0.1.tar.gz#sha256=54c4897bbce99e043137199ec9373f4447e3e88fc3f8c5ade2409a51c7f9ae86 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/5b/93/8a96140c92b11f7928008187a37b4378129510be0d1dcdcb289ddfe258f3/demucs-3.0.1.tar.gz#sha256=54c4897bbce99e043137199ec9373f4447e3e88fc3f8c5ade2409a51c7f9ae86 has different version in metadata: '3.0.1'
  Using cached demucs-3.0.0.tar.gz (1.5 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sz3n7y4o/demucs_22b643e65a08480b9bde7f8285820c1b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sz3n7y4o/demucs_22b643e65a08480b9bde7f8285820c1b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-4322nv3r
         cwd: /tmp/pip-install-sz3n7y4o/demucs_22b643e65a08480b9bde7f8285820c1b/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-sz3n7y4o/demucs_22b643e65a08480b9bde7f8285820c1b/setup.py", line 39, in <module>
        REQUIRED = load_requirements('requirements_minimal.txt')
      File "/tmp/pip-install-sz3n7y4o/demucs_22b643e65a08480b9bde7f8285820c1b/setup.py", line 34, in load_requirements
        required = [i.strip() for i in open(HERE / name)]
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-sz3n7y4o/demucs_22b643e65a08480b9bde7f8285820c1b/requirements_minimal.txt'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/5b/a5/d29ca8f45f1d6dc814d595b9874cb209d45e97c1bbfb41c48968be2e1231/demucs-3.0.0.tar.gz#sha256=d91beb476dfec0362a531a935429f429f3f8dae0d0772da3efb4fad73e9116d2 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached demucs-2.0.3.tar.gz (51 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/48/91/c6594847bc3ab99597f58acdb99c022cfe1d6027353e695778dd90301128/demucs-2.0.3.tar.gz#sha256=f7a8c0cdc9be24d7d8d0e826e64e5ea1cd7a7aa8a3032fe786b932fd7b4ffcce (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/48/91/c6594847bc3ab99597f58acdb99c022cfe1d6027353e695778dd90301128/demucs-2.0.3.tar.gz#sha256=f7a8c0cdc9be24d7d8d0e826e64e5ea1cd7a7aa8a3032fe786b932fd7b4ffcce has different version in metadata: '2.0.3'
  Using cached demucs-2.0.2.tar.gz (51 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/ee/8b/8f3246b5b21cc137c02aeaf9cbeff2a6d1f65aafdb325f11aecc13ba07c3/demucs-2.0.2.tar.gz#sha256=0ca2ee067604915265db990b231fa9ad56c75bf51c12df0c4cec611f31f03bc2 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/ee/8b/8f3246b5b21cc137c02aeaf9cbeff2a6d1f65aafdb325f11aecc13ba07c3/demucs-2.0.2.tar.gz#sha256=0ca2ee067604915265db990b231fa9ad56c75bf51c12df0c4cec611f31f03bc2 has different version in metadata: '2.0.2'
  Using cached demucs-2.0.1.tar.gz (51 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/3b/37/5e853b339c193ce4d6bf47f1c1766ee938c1976eedec0ff9461d9c0b8e10/demucs-2.0.1.tar.gz#sha256=82448b6a57854150f793da407df41dc14102b2923682a10a4457765ea086501b (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/3b/37/5e853b339c193ce4d6bf47f1c1766ee938c1976eedec0ff9461d9c0b8e10/demucs-2.0.1.tar.gz#sha256=82448b6a57854150f793da407df41dc14102b2923682a10a4457765ea086501b has different version in metadata: '2.0.1'
  Using cached demucs-2.0.0.tar.gz (45 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/80/77/4991edb8d4764892260a913048ee607b50da520c4638f2c824ce1bdbe30e/demucs-2.0.0.tar.gz#sha256=a7dac70f14c03163739ba3da59028aae889548c0f6f9f9780b8fa8e43b319b99 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/80/77/4991edb8d4764892260a913048ee607b50da520c4638f2c824ce1bdbe30e/demucs-2.0.0.tar.gz#sha256=a7dac70f14c03163739ba3da59028aae889548c0f6f9f9780b8fa8e43b319b99 has different version in metadata: '2.0.0'
  Using cached demucs-0.0.2.tar.gz (45 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/45/01/b59d89dc34a990ebe5ef66880ca43ec408c31f0a7689975367fd9e52592f/demucs-0.0.2.tar.gz#sha256=4914357489d0d1652f256972c73d385dfee0529c545a8547b139ac88956353e8 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/45/01/b59d89dc34a990ebe5ef66880ca43ec408c31f0a7689975367fd9e52592f/demucs-0.0.2.tar.gz#sha256=4914357489d0d1652f256972c73d385dfee0529c545a8547b139ac88956353e8 has different version in metadata: '0.0.2'
  Using cached demucs-0.0.1.tar.gz (45 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sz3n7y4o/demucs_3db170e5714941f0a591ea7bc3a9dd16/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sz3n7y4o/demucs_3db170e5714941f0a591ea7bc3a9dd16/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zxt1x3k_
         cwd: /tmp/pip-install-sz3n7y4o/demucs_3db170e5714941f0a591ea7bc3a9dd16/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-sz3n7y4o/demucs_3db170e5714941f0a591ea7bc3a9dd16/setup.py", line 25, in <module>
        REQUIRED = [i.strip() for i in open(HERE / "requirements.txt")]
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-sz3n7y4o/demucs_3db170e5714941f0a591ea7bc3a9dd16/requirements.txt'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/f0/0b/ebb129e8724e8822e8f94e231118109f73b4a77ff76d47142e0fced854d7/demucs-0.0.1.tar.gz#sha256=76841228f4befedd0e94387c0a0f03e0b3ab8aacf40001a8f4b062b28160535d (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached demucs-0.0.0.tar.gz (1.5 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sz3n7y4o/demucs_b04439b2272b448d80dba677290fccec/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sz3n7y4o/demucs_b04439b2272b448d80dba677290fccec/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-okmi6md_
         cwd: /tmp/pip-install-sz3n7y4o/demucs_b04439b2272b448d80dba677290fccec/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-sz3n7y4o/demucs_b04439b2272b448d80dba677290fccec/setup.py", line 19, in <module>
        REQUIRED = [i.strip() for i in open("requirements.txt")]
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/80/04/5d0473a2e1261c3789ff6083febb5f797776a42dbbe069691b9cc73c9f10/demucs-0.0.0.tar.gz#sha256=8050de572ca5806244a28130b71b81d2542a02ebb91f37ff727becd7eb03debf (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement demucs
ERROR: No matching distribution found for demucs

Your Environment

  • Python and PyTorch version: Python 3.10.2
  • Operating system and version (desktop or mobile): Arch Linux x86_64
  • Hardware (gpu or cpu, amount of RAM etc.): AMD Ryzen 7 3700X with 64GB of DDR4.
@Enverex Enverex added the bug Something isn't working label Jan 30, 2022
@adefossez
Copy link
Contributor

Can you try the following:

python -m pip install --use-deprecated legacy-resolver demucs

@Enverex
Copy link
Author

Enverex commented Jan 30, 2022

That gets much further... but now fails on a dependency.

Collecting demucs
  Using cached demucs-3.0.3.tar.gz (1.5 MB)
Collecting dora-search
  Using cached dora_search-0.1.8.tar.gz (74 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting diffq>=0.2.1
  Using cached diffq-0.2.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (424 kB)
Collecting julius>=0.2.3
  Using cached julius-0.2.6.tar.gz (58 kB)
ERROR: Could not find a version that satisfies the requirement lameenc>=1.2 (from demucs) (from versions: none)
ERROR: No matching distribution found for lameenc>=1.2 (from demucs)

@adefossez
Copy link
Contributor

See chrisstaite/lameenc#15

Temporary fix would be to use Anaconda to get python3.9. Building locally lameenc is another possiblity.

@adefossez
Copy link
Contributor

there should be lameenc available now, can you give it another go ?

@Enverex
Copy link
Author

Enverex commented Feb 3, 2022

The legacy option (python -m pip install --use-deprecated legacy-resolver demucs) no-longer works:

ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 223, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 320, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/legacy/resolver.py", line 180, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/legacy/resolver.py", line 385, in _resolve_one
    dist = self._get_dist_for(req_to_install)
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/legacy/resolver.py", line 328, in _get_dist_for
    skip_reason = self._check_skip_installed(req)
  File "/usr/lib/python3.10/site-packages/pip/_internal/resolution/legacy/resolver.py", line 233, in _check_skip_installed
    req_to_install.check_if_exists(self.use_user_site)
  File "/usr/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 438, in check_if_exists
    if not self.req.specifier.contains(existing_version, prereleases=True):
  File "/usr/lib/python3.10/site-packages/packaging/specifiers.py", line 790, in contains
    item = parse(item)
  File "/usr/lib/python3.10/site-packages/packaging/version.py", line 57, in parse
    return Version(version)
  File "/usr/lib/python3.10/site-packages/packaging/version.py", line 296, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

Trying without legacy now does work, but again fails on another dependency. "dora_search" this time it seems:

Requirement already satisfied: demucs in /usr/lib/python3.10/site-packages (3.0.3)
Collecting dora-search
  Using cached dora_search-0.1.8.tar.gz (74 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
WARNING: Discarding https://files.pythonhosted.org/packages/f7/ad/53327fcb979720695f44c0de78f8a7693a9471ee8c6aebe14cf49cfc8686/dora_search-0.1.8.tar.gz#sha256=97dc5b1c5158f914188ab2bad4f934a4bf2827151c616ad2d0035f276e530b9f (from https://pypi.org/simple/dora-search/) (requires-python:>=3.7.0). Requested dora-search from https://files.pythonhosted.org/packages/f7/ad/53327fcb979720695f44c0de78f8a7693a9471ee8c6aebe14cf49cfc8686/dora_search-0.1.8.tar.gz#sha256=97dc5b1c5158f914188ab2bad4f934a4bf2827151c616ad2d0035f276e530b9f (from demucs) has different version in metadata: '0.1.8'
  Using cached dora_search-0.1.7.tar.gz (68 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
WARNING: Discarding https://files.pythonhosted.org/packages/2c/ac/47d78e0596af795ee0533cef3def47a8711d2210a72ef1e95a7d4ae10750/dora_search-0.1.7.tar.gz#sha256=1f6c0663074f5a152e86f8babf03940d9b3f38e68c27dfb761d4777084e72c8f (from https://pypi.org/simple/dora-search/) (requires-python:>=3.7.0). Requested dora-search from https://files.pythonhosted.org/packages/2c/ac/47d78e0596af795ee0533cef3def47a8711d2210a72ef1e95a7d4ae10750/dora_search-0.1.7.tar.gz#sha256=1f6c0663074f5a152e86f8babf03940d9b3f38e68c27dfb761d4777084e72c8f (from demucs) has different version in metadata: '0.1.7'
  Using cached dora_search-0.1.6.tar.gz (102 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
WARNING: Discarding https://files.pythonhosted.org/packages/b6/5b/6c35c3761551a44aa9d37ad4f9458097e92d64081b01f85ba3fbafd20f53/dora_search-0.1.6.tar.gz#sha256=65ddd951b0c178937e043e30115542d92decf1273deaac19187b61462c6eacc8 (from https://pypi.org/simple/dora-search/) (requires-python:>=3.7.0). Requested dora-search from https://files.pythonhosted.org/packages/b6/5b/6c35c3761551a44aa9d37ad4f9458097e92d64081b01f85ba3fbafd20f53/dora_search-0.1.6.tar.gz#sha256=65ddd951b0c178937e043e30115542d92decf1273deaac19187b61462c6eacc8 (from demucs) has different version in metadata: '0.1.6'
  Using cached dora_search-0.1.5.tar.gz (102 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
WARNING: Discarding https://files.pythonhosted.org/packages/b4/23/a032df818739bd4aad501f7cec5074a76842baa453902ebf3723a9915efd/dora_search-0.1.5.tar.gz#sha256=d9786a85ed1caac4f774a6b35e5b657498533b91e70a4762f31efa72e8b76478 (from https://pypi.org/simple/dora-search/) (requires-python:>=3.7.0). Requested dora-search from https://files.pythonhosted.org/packages/b4/23/a032df818739bd4aad501f7cec5074a76842baa453902ebf3723a9915efd/dora_search-0.1.5.tar.gz#sha256=d9786a85ed1caac4f774a6b35e5b657498533b91e70a4762f31efa72e8b76478 (from demucs) has different version in metadata: '0.1.5'
  Using cached dora_search-0.1.4.tar.gz (101 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
WARNING: Discarding https://files.pythonhosted.org/packages/fb/2b/c835162bf552fdbf220d413b2ba8fcefff9916644dd0dd41645954c12c45/dora_search-0.1.4.tar.gz#sha256=67230a6bfa17182387909ec3fa6fcdcffb2514f7c4a9fe44db77eaf07d5dacac (from https://pypi.org/simple/dora-search/) (requires-python:>=3.7.0). Requested dora-search from https://files.pythonhosted.org/packages/fb/2b/c835162bf552fdbf220d413b2ba8fcefff9916644dd0dd41645954c12c45/dora_search-0.1.4.tar.gz#sha256=67230a6bfa17182387909ec3fa6fcdcffb2514f7c4a9fe44db77eaf07d5dacac (from demucs) has different version in metadata: '0.1.4'
Collecting demucs
  Using cached demucs-3.0.3.tar.gz (1.5 MB)
WARNING: Discarding https://files.pythonhosted.org/packages/17/24/3b75e03243651603b95d8dbdb99eba104a464d3e8ca26d1ad54d95a985c5/demucs-3.0.3.tar.gz#sha256=c779a75537088bef53e96d67c5a999b5a9189d82ea78d9440df718ba3a318308 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/17/24/3b75e03243651603b95d8dbdb99eba104a464d3e8ca26d1ad54d95a985c5/demucs-3.0.3.tar.gz#sha256=c779a75537088bef53e96d67c5a999b5a9189d82ea78d9440df718ba3a318308 has different version in metadata: '3.0.3'
  Using cached demucs-3.0.2.tar.gz (1.5 MB)
WARNING: Discarding https://files.pythonhosted.org/packages/6b/ed/61e40fe1d1b43507d2d4d5981711d556504bab18876c2474ae5e0751e9e3/demucs-3.0.2.tar.gz#sha256=757dd6a5cdbf548f33940f9b5838f3187f1711c58ef25f3c2f08bcd51de1e7a7 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/6b/ed/61e40fe1d1b43507d2d4d5981711d556504bab18876c2474ae5e0751e9e3/demucs-3.0.2.tar.gz#sha256=757dd6a5cdbf548f33940f9b5838f3187f1711c58ef25f3c2f08bcd51de1e7a7 has different version in metadata: '3.0.2'
  Using cached demucs-3.0.1.tar.gz (1.5 MB)
WARNING: Discarding https://files.pythonhosted.org/packages/5b/93/8a96140c92b11f7928008187a37b4378129510be0d1dcdcb289ddfe258f3/demucs-3.0.1.tar.gz#sha256=54c4897bbce99e043137199ec9373f4447e3e88fc3f8c5ade2409a51c7f9ae86 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/5b/93/8a96140c92b11f7928008187a37b4378129510be0d1dcdcb289ddfe258f3/demucs-3.0.1.tar.gz#sha256=54c4897bbce99e043137199ec9373f4447e3e88fc3f8c5ade2409a51c7f9ae86 has different version in metadata: '3.0.1'
  Using cached demucs-3.0.0.tar.gz (1.5 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zh8yzpmd/demucs_bf4ce312908b458e94cd8161c43c166b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zh8yzpmd/demucs_bf4ce312908b458e94cd8161c43c166b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-hwzko_c4
         cwd: /tmp/pip-install-zh8yzpmd/demucs_bf4ce312908b458e94cd8161c43c166b/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-zh8yzpmd/demucs_bf4ce312908b458e94cd8161c43c166b/setup.py", line 39, in <module>
        REQUIRED = load_requirements('requirements_minimal.txt')
      File "/tmp/pip-install-zh8yzpmd/demucs_bf4ce312908b458e94cd8161c43c166b/setup.py", line 34, in load_requirements
        required = [i.strip() for i in open(HERE / name)]
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-zh8yzpmd/demucs_bf4ce312908b458e94cd8161c43c166b/requirements_minimal.txt'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/5b/a5/d29ca8f45f1d6dc814d595b9874cb209d45e97c1bbfb41c48968be2e1231/demucs-3.0.0.tar.gz#sha256=d91beb476dfec0362a531a935429f429f3f8dae0d0772da3efb4fad73e9116d2 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached demucs-2.0.3.tar.gz (51 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/48/91/c6594847bc3ab99597f58acdb99c022cfe1d6027353e695778dd90301128/demucs-2.0.3.tar.gz#sha256=f7a8c0cdc9be24d7d8d0e826e64e5ea1cd7a7aa8a3032fe786b932fd7b4ffcce (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/48/91/c6594847bc3ab99597f58acdb99c022cfe1d6027353e695778dd90301128/demucs-2.0.3.tar.gz#sha256=f7a8c0cdc9be24d7d8d0e826e64e5ea1cd7a7aa8a3032fe786b932fd7b4ffcce has different version in metadata: '2.0.3'
  Using cached demucs-2.0.2.tar.gz (51 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/ee/8b/8f3246b5b21cc137c02aeaf9cbeff2a6d1f65aafdb325f11aecc13ba07c3/demucs-2.0.2.tar.gz#sha256=0ca2ee067604915265db990b231fa9ad56c75bf51c12df0c4cec611f31f03bc2 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/ee/8b/8f3246b5b21cc137c02aeaf9cbeff2a6d1f65aafdb325f11aecc13ba07c3/demucs-2.0.2.tar.gz#sha256=0ca2ee067604915265db990b231fa9ad56c75bf51c12df0c4cec611f31f03bc2 has different version in metadata: '2.0.2'
  Using cached demucs-2.0.1.tar.gz (51 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/3b/37/5e853b339c193ce4d6bf47f1c1766ee938c1976eedec0ff9461d9c0b8e10/demucs-2.0.1.tar.gz#sha256=82448b6a57854150f793da407df41dc14102b2923682a10a4457765ea086501b (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/3b/37/5e853b339c193ce4d6bf47f1c1766ee938c1976eedec0ff9461d9c0b8e10/demucs-2.0.1.tar.gz#sha256=82448b6a57854150f793da407df41dc14102b2923682a10a4457765ea086501b has different version in metadata: '2.0.1'
  Using cached demucs-2.0.0.tar.gz (45 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/80/77/4991edb8d4764892260a913048ee607b50da520c4638f2c824ce1bdbe30e/demucs-2.0.0.tar.gz#sha256=a7dac70f14c03163739ba3da59028aae889548c0f6f9f9780b8fa8e43b319b99 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/80/77/4991edb8d4764892260a913048ee607b50da520c4638f2c824ce1bdbe30e/demucs-2.0.0.tar.gz#sha256=a7dac70f14c03163739ba3da59028aae889548c0f6f9f9780b8fa8e43b319b99 has different version in metadata: '2.0.0'
  Using cached demucs-0.0.2.tar.gz (45 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/45/01/b59d89dc34a990ebe5ef66880ca43ec408c31f0a7689975367fd9e52592f/demucs-0.0.2.tar.gz#sha256=4914357489d0d1652f256972c73d385dfee0529c545a8547b139ac88956353e8 (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Requested demucs from https://files.pythonhosted.org/packages/45/01/b59d89dc34a990ebe5ef66880ca43ec408c31f0a7689975367fd9e52592f/demucs-0.0.2.tar.gz#sha256=4914357489d0d1652f256972c73d385dfee0529c545a8547b139ac88956353e8 has different version in metadata: '0.0.2'
  Using cached demucs-0.0.1.tar.gz (45 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zh8yzpmd/demucs_135238bfc8944b188403cccf243f8480/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zh8yzpmd/demucs_135238bfc8944b188403cccf243f8480/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-r2kbf09b
         cwd: /tmp/pip-install-zh8yzpmd/demucs_135238bfc8944b188403cccf243f8480/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-zh8yzpmd/demucs_135238bfc8944b188403cccf243f8480/setup.py", line 25, in <module>
        REQUIRED = [i.strip() for i in open(HERE / "requirements.txt")]
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-zh8yzpmd/demucs_135238bfc8944b188403cccf243f8480/requirements.txt'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/f0/0b/ebb129e8724e8822e8f94e231118109f73b4a77ff76d47142e0fced854d7/demucs-0.0.1.tar.gz#sha256=76841228f4befedd0e94387c0a0f03e0b3ab8aacf40001a8f4b062b28160535d (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached demucs-0.0.0.tar.gz (1.5 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zh8yzpmd/demucs_372830ede72545b2a766db13a9ce62ed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-zh8yzpmd/demucs_372830ede72545b2a766db13a9ce62ed/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-1_r7r2st
         cwd: /tmp/pip-install-zh8yzpmd/demucs_372830ede72545b2a766db13a9ce62ed/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-zh8yzpmd/demucs_372830ede72545b2a766db13a9ce62ed/setup.py", line 19, in <module>
        REQUIRED = [i.strip() for i in open("requirements.txt")]
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/80/04/5d0473a2e1261c3789ff6083febb5f797776a42dbbe069691b9cc73c9f10/demucs-0.0.0.tar.gz#sha256=8050de572ca5806244a28130b71b81d2542a02ebb91f37ff727becd7eb03debf (from https://pypi.org/simple/demucs/) (requires-python:>=3.7.0). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement dora-search (from demucs)
ERROR: No matching distribution found for dora-search

@Enverex
Copy link
Author

Enverex commented Feb 3, 2022

I logged a ticket there (facebookresearch/dora#18) then realised you're a contributor of that repo so that was probably redundant, lol.

@adefossez
Copy link
Contributor

The core issue is actually that torch is not available on python 3.10 at the moment, pip install torch fails for me.

Honestly for deep learning tools, you shouldn't expect being able to use bleeding edge versions of Python. It always takes a bit of time for all the frameworks to adapt, and I know I personally stopped at 3.8 to avoid running into those issues. Things like Google Colab are typically running quite old versions of Python (e.g. 3.8) and sticking to that one means I'm sure I can ship to Colab easily.

@adefossez
Copy link
Contributor

See PyTorch task: pytorch/pytorch#66424 (comment)

@Marviel
Copy link

Marviel commented Oct 25, 2022

Unfortunately even when running with python 3.9 inside Docker on a Mac M1, this is still happening.

I believe this is also an issue with running Demucs in a Docker container on Mac M1 machines , because lameenc does not have an arm version deployed for linux

I could also have traced my errors wrong. It doesn't appear that pytorch has an arm64 build available on linux either so....

@IvanIVGrozny
Copy link

IvanIVGrozny commented Mar 6, 2023

I found a way to get demucs to install on Python 3.10 and 3.11

First, install FFmpeg:

python -m pip install ffmpeg

Then, install pytorch this way:

CPU: python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cpu
CUDA 11.7: python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu117
CUDA 11.8: python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu118
ROCM 5.4: python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/test/rocm5.4/

Next, install SoundFile:

python -m pip install soundfile

EDIT: forgot to mention you have to install Sox on Linux instead of SoundFile:

python -m pip install sox

Finally, install demucs this way: (thank you @adefossez)

python -m pip install --use-deprecated legacy-resolver demucs

Everything should be installed and working fine. @Ma5onic can this be added to README.md?

@FelixNgFender
Copy link

For those using Poetry and WSL2 (Ubuntu):

FFmpeg:

poetry add ffmpeg

CUDA 11.8:

poetry source add --priority=explicit pytorch-gpu-src https://download.pytorch.org/whl/test/cu118

poetry add --source pytorch-gpu-src torch torchvision torchaudio

Sox:

poetry add sox

Demucs:

poetry add demucs

This works wonderfully, the GPU utilization always reaches 100% during separation.

@CarlGao4
Copy link
Contributor

(Hasn't this issue been fixed?)

@FelixNgFender
Copy link

When I install demucs without any prior installations in a fresh virtual environment (WSL2, Ubuntu), it throws ValueError: libcublas.so.*[0-9] not found in the system path [a list of Python paths]

@MatiasRizzi
Copy link

poetry source add --priority=explicit pytorch-gpu-src https://download.pytorch.org/whl/test/cu118

poetry add --source pytorch-gpu-src torch torchvision torchaudio

when run command, I have bug:
[BUG] not torch (==2.2.0) is not satisfied.

@CarlGao4
Copy link
Contributor

Can you install with PIP?

@FelixNgFender
Copy link

PIP should work normally last time I checked. In other words, if you are using Poetry, install all other dependencies normally. For torch, torchvision, and torchaudio, use the instructions specified at https://pytorch.org/get-started/locally/ for your platform.

@CarlGao4
Copy link
Contributor

PIP should work normally last time I checked. In other words, if you are using Poetry, install all other dependencies normally. For torch, torchvision, and torchaudio, use the instructions specified at https://pytorch.org/get-started/locally/ for your platform.

This is not the correct way to install torch. torch is going to release 2.2.0, which is not and also will probably not supported, so you'd better follow the instructions at https://pytorch.org/get-started/previous-versions/#v211

@MatiasRizzi
Copy link

This is not the correct way to install torch. torch is going to release 2.2.0, which is not and also will probably not supported, so you'd better follow the instructions at https://pytorch.org/get-started/previous-versions/#v211

Follow this instructions for cuda 11.8 and run the poetry correctly.

poetry add  torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 

Use python 3.11.6 version.
Thanks

@00mario
Copy link

00mario commented Jul 26, 2024

Tried to follow your instructions but can't go thru this error. I'm actually trying to pip install -r requirements.txt

INFO: pip is still looking at multiple versions of demucs to determine which version is compatible with other requirements. This could take a while.
Using cached demucs-3.0.0.tar.gz (1.5 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/private/var/folders/8d/z1rn6bpx2vg61z79yqk36rz80000gn/T/pip-install-k0iui6n3/demucs_6424eaf6b8fd499fbaeff29d37f6bdb7/setup.py", line 39, in
REQUIRED = load_requirements('requirements_minimal.txt')
File "/private/var/folders/8d/z1rn6bpx2vg61z79yqk36rz80000gn/T/pip-install-k0iui6n3/demucs_6424eaf6b8fd499fbaeff29d37f6bdb7/setup.py", line 34, in load_requirements
required = [i.strip() for i in open(HERE / name)]
FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/8d/z1rn6bpx2vg61z79yqk36rz80000gn/T/pip-install-k0iui6n3/demucs_6424eaf6b8fd499fbaeff29d37f6bdb7/requirements_minimal.txt'
[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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants