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

Windows : installation ..problem ? #175

Open
zigomario opened this issue Oct 16, 2024 · 12 comments
Open

Windows : installation ..problem ? #175

zigomario opened this issue Oct 16, 2024 · 12 comments

Comments

@zigomario
Copy link

zigomario commented Oct 16, 2024

Hello,

i'm not sur to understand the process instal. ( windows)
Python 3.10 : ok
ffmpeg in PATH : ok

Like run_on_windows don"t work .. i play manualy the scrypt :
[-](c:\UltraSinger>.venv/Scripts/activate.bat
cd src

i start finally here : (venv) c:\UltraSinger\src>

and..i try something like that :
py UltraSinger.py --crepe full --whisper large-v2 -i "input/song_to_parse.mp3" --language=en

Results : ModuleNotFoundError: No module named 'Levenshtein'

So.. i do "pip install Levenshtein"..
Replay my command..and :

Traceback (most recent call last):
File "c:\UltraSinger\src\UltraSinger.py", line 9, in
from packaging import version
ModuleNotFoundError: No module named 'packaging'

=> pip install packaging

And again again again... x module to install later..

and now new Error :

ImportError: cannot import name 'Hyphenator' from 'hyphen' (c:\UltraSinger\venv\lib\site-packages\hyphen_init.py)_

Finaly, i'm not sur that i need to install all this module... my process install is wrong ? ( maybe error on my python ? )

edit ..
After 15 module to install.. some trap ( downgrade yumi.., double install of hyphen) .. it's work ..
I'm always suprising about this process but thanks you anyway for the tools

Thanks to advance

@mARTin-B78
Copy link

mARTin-B78 commented Oct 18, 2024

I had the same issue on a Fresh installed Windows 10
and running these commands in the CMD with Admin rights helped.
`
pip install pytube
pip install python-Levenshtein
pip install packaging
pip install ffmpeg-python
pip install demucs
pip install pydub
pip install librosa
pip install dataclasses_json
pip install yt_dlp
pip install pillow
pip install musicbrainzngs
pip install pretty_midi
pip install unidecode
pip install crepe
pip install hyphen
pip install Hyphenator
pip install pyhyphen
pip install whisperx
pip install langcodes
pip install music21
pip install tensorflow
pip install tensorflow-cpu

`

Maybe the requirements.txt needs an update to add these?

@rakuri255
Copy link
Owner

The issue is in the requirement.txt and is releated to this issue: #170

I bumped the corrupt matplotlib. Should work now.
Can you guys confirm?

@mARTin-B78
Copy link

mARTin-B78 commented Oct 19, 2024

How can I confirm it as now everything is installed.
How can I set it back to a previous stage? Delete the Python310\Lib\site-packages folder?

@mARTin-B78
Copy link

without changing anything I get this error now
"WARNING: Ignoring invalid distribution -ensorflow (c:\users\martin\appdata\local\programs\python\python310\lib\site-packages)"

think it is the torch Package

pip install torch --no-cache-dir

WARNING: Ignoring invalid distribution -ensorflow (c:\users\martin\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ensorflow (c:\users\martin\appdata\local\programs\python\python310\lib\site-packages)
Requirement already satisfied: torch in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (2.5.0)
Requirement already satisfied: networkx in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (from torch) (3.3)
Requirement already satisfied: typing-extensions>=4.8.0 in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (from torch) (4.12.2)
Requirement already satisfied: filelock in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (from torch) (3.15.4)
Requirement already satisfied: fsspec in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (from torch) (2024.6.1)
Requirement already satisfied: jinja2 in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (from torch) (3.1.4)
Requirement already satisfied: sympy==1.13.1 in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (from torch) (1.13.1)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (from sympy==1.13.1->torch) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (from jinja2->torch) (2.1.5)
WARNING: Ignoring invalid distribution -ensorflow (c:\users\martin\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ensorflow (c:\users\martin\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ensorflow (c:\users\martin\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ensorflow (c:\users\martin\appdata\local\programs\python\python310\lib\site-packages)

@mARTin-B78
Copy link

mARTin-B78 commented Oct 19, 2024

I create installation Batch Scripts that install everything needed to run UltraSinger.

  • winget
  • ffmpeg
  • python 3.10
  • git
  • ultrasinger
  • musescore

JUST REMOVE THE ".TXT" at the end of the Files, Apart from the file "additional-requirements.txt" that stays as it is. additional-requirements.txt

Open an CMD Console in windows with admin rights.

1st-part-install-winget-ffmpeg-and-python-3.10.bat
1st-part-install-winget-ffmpeg-and-python-3.10.bat.TXT
REBOOT - cause of Python

Open an CMD Console in windows with admin rights.

2nd-part-install-git-ultrasinger-with-modules-musescore.bat
2nd-part-install-git-ultrasinger-with-modules-musescore.bat.TXT

When Everything is installed you can use a Batchfile to Generate Karaoke Songs out of Youtube Playlists with UltraSinger
batch_generate_karaoke_songs_from_youtube_playlist_with_ultrasinger.bat.txt

@rakuri255
Copy link
Owner

For reinstallation you should delete the venv folder.
For go to previous version you can checkout previous commit with git.

@rakuri255
Copy link
Owner

@mARTin-B78 make an PR and we could add it to the project :)

@mARTin-B78
Copy link

I recreated the Installer for Windows made for people who are not programmers and have most tools not installed yet.

Batch Script 1 1st-part-install-winget-ffmpeg-and-python-3.10.bat download and remove the ".TXT"
1st-part-install-winget-ffmpeg-and-python-3.10.bat.TXT

  1. Check and Install Winget
    Verifies if Winget is installed; if not, it installs Winget automatically.
  2. Check and Install FFMPEG
    Tests if FFMPEG is installed; if missing, installs FFMPEG and sets the environment variable.
  3. Check and Install Python 3.10
    Ensures Python 3.10 is installed; if not, installs it and sets the environment variable.

Finally, it informs the user to reboot the system.

Batch Script 2 2nd-part-install-git-ultrasinger-with-modules-musescore.bat
2nd-part-install-git-ultrasinger-with-modules-musescore.bat.TXT download and remove the ".TXT"

  1. Re-check and Install Winget
    Confirms that Winget is truly installed; if not, installs it, or skips this step if already present.
  2. Check and Install PIP
    Verifies if PIP is installed and installs it if necessary.
  3. Check and Install GIT
    Ensures GIT is installed; if not, it installs GIT.
  4. Check and Install UltraSinger
    Checks if UltraSinger is installed and installs it if needed.
  5. Check and Optional Install of MuseScore
    Verifies if MuseScore is installed; if not, it asks the user whether to install MuseScore.
  6. Install Python Packages from requirements.txt
    Installs all required packages listed in requirements.txt.
  7. Check and Install CUDA
    Checks if a GPU is available. If yes, installs CUDA; otherwise, sets up CPU support.
  8. Additional Python Packages
    Installs missing Python packages from additional-requirements.txt.

at the end it uninstalls torch and reinstalls torch - I do not know why it does not work without that step.

File with python modules that seme to be missing
additional-requirements.txt

Batch workflow
batch_generate_karaoke_songs_from_youtube_playlist_with_ultrasinger.bat.TXT

@passuff
Copy link

passuff commented Dec 9, 2024

@mARTin-B78 thanks a lot for your scripts. I had some errors with 2nd script:

1st error: [EDIT] solved by using python and py launcher Ver 3.10.11 and deleting all other instances...

Collecting resampy==0.2.2 (from -r C:\Program Files\UltraSinger\requirements.txt (line 458))
  Downloading resampy-0.2.2.tar.gz (323 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\userxy\AppData\Local\Temp\pip-install-zg63pcez\resampy_a940f56546eb404ca8ae07ad60e34e7b\setup.py", line 2, in <module>
          import imp
      ModuleNotFoundError: No module named 'imp'
      [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.
Checking for GPU...
GPU found: Citrix Indirect Display Adapter`

2nd error: [EDIT] maybe not relevant???

Installing CPU-only packages...
No suitable Python runtime found
Pass --list (-0) to see all detected environments on your machine
or set environment variable PYLAUNCHER_ALLOW_INSTALL to use winget
or open the Microsoft Store to the requested version.
Das System kann den angegebenen Pfad nicht finden.

3rd error: [EDIT] maybe not relevant???

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
ERROR: Could not find a version that satisfies the requirement torch==2.0.1 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.5.0, 2.5.1)
ERROR: No matching distribution found for torch==2.0.1
UNINSTALLING AND REINSTALLING torch, cause otherwise it does not work
ECHO ist ausgeschaltet (OFF).
Found existing installation: torch 2.5.1
Uninstalling torch-2.5.1:
  Would remove:``

I think there is a double installation of requirements.txt:

1st occurrence:

:: Install the required Python packages echo Installing required Python packages... echo %ultrasinger_dir% py -m pip install -r "%ultrasinger_dir%\requirements.txt"

2nd occourence:

CPU/GPU:

echo Installing CPU-only packages...
@echo off
cd ..
cd ..
py -3.10 -m venv .venv2
call .venv\Scripts\activate
pip install -r requirements.txt

I would guess only executing once is sufficient.

[EDIT] It seems with just sorting the mess of several Python versions installed, the first Error disapperared and the others seems not relevant.
Unfortunaltey I had to reinstall requirements.txt manually again after 2nd script. Maybe that error would not have occoured if the second installation of requirements.txt would have been performed.
Everything else seems to work... Thanks a lot.

@agwosdz
Copy link
Contributor

agwosdz commented Dec 24, 2024

These scripts do not create a venv, if I am not mistaken. Generally speaking, not a good idea :) Great work though

@rakuri255
Copy link
Owner

UltraSinger itself now checks for ffmpeg.
Python 3.10 is only needed because of tensorflow 2.10 which also only needed to use gpu on Windows.
For docker and colab, which is linux, we use the latest versions.

Tensorflow is used by crepe. Maybe we should switch to torchcrepe to also use torch.

@Bokkiej
Copy link

Bokkiej commented Jan 4, 2025

Same problem here. Tried @mARTin-B78 's batch files but it hangs on script 1 - keeps saying "Updating winget package sources" for hours.

EDIT: after deleting that part of the batch file, it seems to run as it should as does script 2, but afterwards starting Ultrasinger.py again gives the same error, that it's missing Levenshtein (and all other stuff afterwards). Starting both batch files again doesn't make any difference.

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

6 participants