Anjok07 / ultimatevocalremovergui

GUI for a Vocal Remover that uses Deep Neural Networks.
MIT License
18.01k stars 1.35k forks source link

[BUG] It simply doesn't build in a venv #1046

Open ManuLinares opened 10 months ago

ManuLinares commented 10 months ago

System: Archlinux Python 3.10.13 or Python 3.11.6

Steps to reproduce:

git clone https://github.com/Anjok07/ultimatevocalremovergui
cd ultimatevocalremovergui
python -m venv ./venv
source ./venv/bin/activate
pip install -r requirements.txt

python 3.10

...
Collecting playsound==1.3.0 (from -r requirements.txt (line 24))
  Downloading playsound-1.3.0.tar.gz (7.7 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      Traceback (most recent call last):
        File "/home/mb/scripts/ultimatevocalremovergui/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/mb/scripts/ultimatevocalremovergui/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/mb/scripts/ultimatevocalremovergui/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-zsgbegyi/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-zsgbegyi/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-zsgbegyi/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-zsgbegyi/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 6, in <module>
        File "/usr/lib/python3.10/inspect.py", line 1139, in getsource
          lines, lnum = getsourcelines(object)
        File "/usr/lib/python3.10/inspect.py", line 1121, in getsourcelines
          lines, lnum = findsource(object)
        File "/usr/lib/python3.10/inspect.py", line 958, in findsource
          raise OSError('could not get source code')
      OSError: could not get source code
      [end of output]

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

python 3.11

...
Collecting llvmlite==0.39.1 (from -r requirements.txt (line 13))
  Using cached llvmlite-0.39.1.tar.gz (132 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      Traceback (most recent call last):
        File "/home/mb/scripts/ultimatevocalremovergui/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/mb/scripts/ultimatevocalremovergui/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/mb/scripts/ultimatevocalremovergui/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-f195g7g0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-f195g7g0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-f195g7g0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-f195g7g0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 55, in <module>
        File "<string>", line 52, in _guard_py_ver
      RuntimeError: Cannot install on Python version 3.11.6; only versions >=3.7,<3.11 are supported.
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
mithusingh32 commented 10 months ago

I have similar issue, but I was able to get passed the failure at playsound.

  1. source /path/to/venv/bin/activate
  2. pip3 install playsound
  3. pip3 install -r requirement.txt

But you might run into a failure again further down. Here's where I get a failure:

ollecting onnx (from -r requirements.txt (line 35))
  Using cached onnx-1.11.0.tar.gz (9.9 MB)
  Preparing metadata (setup.py) ... done
  Using cached onnx-1.10.2.tar.gz (9.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
  Using cached onnx-1.10.1.tar.gz (10.0 MB)
  Preparing metadata (setup.py) ... done
  Using cached onnx-1.10.0.tar.gz (10.0 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      fatal: not a git repository (or any of the parent directories): .git
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-mq99n2sz/onnx_4ea4cb35d52e432e89bb19a3ad5cbb45/setup.py", line 318, in <module>
          raise FileNotFoundError("Unable to find " + requirements_file)
      FileNotFoundError: Unable to find requirements.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.

Update

Check #1068 for the changes I made to get it to work properly.

EmersonBiggons commented 5 months ago

If people are still having issues with this I have a fix; just run this command (While in venv of course) pip install --upgrade wheel and then run pip3 install -r requirements.txt this seemed to fix it for me.

edit: For some reason I wasn't having issues with onnx before and I am now and I have no idea why. I'm getting that same FileNotFoundError: Unable to find requirements.txt error as the above text, I wasn't before and I am now upon trying to install it from scratch.

mortalis13 commented 5 months ago

https://github.com/TaylorSMarks/playsound/issues/150 Searching for the concrete library issues normally helps too, though I see the solution was given after this ticket was created.

mortalis13 commented 4 months ago

Leaving here the sequence that worked for me. Windows 10, Python 3.11.

For sklearn sub-dependency, the library informs The 'sklearn' PyPI package is deprecated, use 'scikit-learn' rather than 'sklearn' for pip commands.. So it would be better to use the library they propose, but it's not directly in the requirements.txt, so it has to be investigated which library has this dependency and maybe try to change that library version, but it's much faster to use the env variable for now.

ManuLinares commented 4 months ago

Still doesn't build, now the error appear to be "audioread".

Steps to reproduce in a fresh install.

git clone https://github.com/Anjok07/ultimatevocalremovergui
cd ultimatevocalremovergui
python3 -m venv ./venv
source ./venv/bin/activate
pip install -r requirements.txt
Ignoring PySoundFile: markers 'sys_platform == "darwin"' don't match your environment
Collecting altgraph==0.17.3 (from -r requirements.txt (line 1))
  Using cached altgraph-0.17.3-py2.py3-none-any.whl.metadata (7.4 kB)
Collecting audioread==3.0.0 (from -r requirements.txt (line 2))
  Using cached audioread-3.0.0.tar.gz (377 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/home/mb/scripts/ultimatevocalremovergui/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/mb/scripts/ultimatevocalremovergui/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/mb/scripts/ultimatevocalremovergui/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-6c9ffbhv/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-6c9ffbhv/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-6c9ffbhv/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-6c9ffbhv/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 17, in <module>
      ModuleNotFoundError: No module named 'imp'
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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

Archlinux: python 3.12.3-1 python-pip 24.0-2 tk 8.6.14-3 ffmpeg 2:6.1.1-7

mortalis13 commented 4 months ago

OK, I haven't received the same error, but understood that due to caching it's not enough to only change the numpy version. I removed the pip cache and started from the beginning. Check the updated steps above if it helps.

mortalis13 commented 4 months ago

Here is the output of full install according to the steps above, with removed cache folder before the run. I only see the cached Cython, but that should be something internal for python itself. In theory, it should be possible to take those versions and install them directly, or from another requirements.txt and the project should be runnable.

pip-log.txt

mortalis13 commented 4 months ago

Well basically pip-freeze maybe would be more useful... pip-freeze.txt

ManuLinares commented 4 months ago

I thinks you are trying to help but I don't know why are you spamming 👍

Are you saying I should use/downgrade to Python 3.11?

Nowhere in the documentation says that is a requirement.

The installation instructions for any Linux environment should be this simple:

git clone https://github.com/Anjok07/ultimatevocalremovergui && cd ultimatevocalremovergui
python3 -m venv ./venv
source ./venv/bin/activate
pip install -r requirements.txt

If that doesn't work, then the "requirements.txt" is wrong and/or the Python version should be specified somewhere.

mortalis13 commented 4 months ago

I'm not spamming. I investigated the problem and found a solution that works for me. You can do whatever you want. I propose options that could help. It's up to you to check multiple approaches and test with python versions, OSs etc. or just wait a miracle from the sky that auto solves every problem. In tech/programming environment there can be a lot of reasons why some code doesn't work, like OS compatibility, framework/libraries versions which can work at some moment of time, and then the next day something internal or external changes and that "perfect" combination stops working.

The last change to the repo was some time ago, it was probably working at that time. But during that period libraries without versions in the "requirements" surely have changed and are no longer compatible with the fixed-version libraries.

Python version I saw in the readme is 3.9 btw...

mortalis13 commented 4 months ago

Besides I'd say the python version is probably not the issue, although it could be, I've left other clues before, regarding versions, env variables and cache...