CorentinJ / Real-Time-Voice-Cloning

Clone a voice in 5 seconds to generate arbitrary speech in real-time
Other
52.05k stars 8.71k forks source link

Requirements.txt failed to install with obscure issue with installing audioread #1122

Closed michael-ts closed 1 year ago

michael-ts commented 1 year ago

I ran into a few issues along the way that I was able to solve, namely errors like this:

  WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 2] The system cannot find the file specified: 
'C:\\Python310\\Scripts\\f2py.exe' -> 'C:\\Python310\\Scripts\\f2py.exe.deleteme'

I fixed these by adding --user to the pip command.

I also had to change requirements.txt to a newer version of numpy (1.22.1) to prevent it from failing to install due to older versions not being compatible with the version of Python I already have installed (3.10.6)

But now I'm stuck on this one:

Requirement already satisfied: jsonpointer>=1.9 in c:\users\michael\appdata\roaming\python\python310\site-packages (from jsonpatch->visdom==0.1.8.9->-r R:\requirements.txt (line 15)) (2.3)
Using legacy 'setup.py install' for umap-learn, since package 'wheel' is not installed.
Using legacy 'setup.py install' for visdom, since package 'wheel' is not installed.
Using legacy 'setup.py install' for audioread, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pynndescent, since package 'wheel' is not installed.
Installing collected packages: audioread, visdom, SoundFile, sounddevice, scikit-learn, resampy, pooch, matplotlib, pynndescent, librosa, umap-learn
  Running setup.py install for audioread ... error
  error: subprocess-exited-with-error

  × Running setup.py install for audioread did not run successfully.
  │ exit code: 1
  ╰─> [40 lines of output]
      C:\Users\michael\AppData\Local\Temp\pip-install-nat_itg2\audioread_fa5fbfcd88364fc89c7b2a9e454b5549\setup.py:17: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
        import imp
      running install
      C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      Traceback (most recent call last):
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\util.py", line 258, in subst_vars
          return _subst_compat(s).format_map(lookup)
      KeyError: 'py_version_nodot_plat'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\michael\AppData\Local\Temp\pip-install-nat_itg2\audioread_fa5fbfcd88364fc89c7b2a9e454b5549\setup.py", line 27, in <module>
          setup(name='audioread',
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\core.py", line 148, in setup
          return run_commands(dist)
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
          dist.run_commands()
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
          self.run_command(cmd)
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\dist.py", line 985, in run_command
          cmd_obj.ensure_finalized()
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\cmd.py", line 107, in ensure_finalized
          self.finalize_options()
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\command\install.py", line 45, in finalize_options
          orig.install.finalize_options(self)
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\command\install.py", line 381, in finalize_options
          self.expand_dirs()
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\command\install.py", line 563, in expand_dirs
          self._expand_attrs(['install_purelib', 'install_platlib',
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\command\install.py", line 553, in _expand_attrs
          val = subst_vars(val, self.config_vars)
        File "C:\Users\michael\AppData\Roaming\Python\Python310\site-packages\setuptools\_distutils\util.py", line 260, in subst_vars
          raise ValueError(f"invalid variable {var}")
      ValueError: invalid variable 'py_version_nodot_plat'
      [end of output]

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

× Encountered error while trying to install package.
╰─> audioread

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

I'm not sure if the issue is due to "setup.py install" being deprecated; if that's the case I have no idea what the fix is because I think this is being required somewhere else - maybe another package needs a newer version? But I have no idea which one.

I also thought maybe it could be that wheel wasn't installed, since package 'wheel' is not installed. but when I try to install it, it says it's already installed:

C:\> pip install wheel --user

Requirement already satisfied: wheel in c:\python310\lib\site-packages (0.37.1)

There's also the invalid variable error, but I have no idea what this is talking about.

michael-ts commented 1 year ago

I was able to get past the audioread issue by manually installing it in a separate step:

pip install audioread --user

After this I reran: pip install -r R:\requirements.txt --user and everything succeeded in installing.

Then there was one more slight hiccup. After finishing Step #1 of the install instructions, I skipped the optional 2nd step and tried to run the optional 3rd step... only for demo_cli.py to be not found. I try to follow install instructions exactly, and it appears the step on how to actually install this repo is missing. It didn't take me too long to figure out (after searching my entire disk for demo*py to download the zipfile and put it somewhere, but as it stands I believe the instructions are technically incomplete.