-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
[Bug]: No module named 'mgds' #670
Comments
MGDS is not shipped via pip, so you can't install it that way. It looks like you may have installed this in a weird way since you are missing a core part that gets installed by the automatic scripts. To resolve this I would recommend that you delete the Edit: It would be helpful to know how you originally installed it to get this broken installation? |
@DiegoRRR Could you please update us on your exact installation steps? If I dont hear from you I will be closing this as without proof I can only assume user error. |
I just follow the instructions: I deleted the
Long paths are enabled though, I checked. With my venv folder,
|
On Windows, running the automatic installer fails, as the requirements are now out of date. Here are the changes I had to make to get the right versions installed. PS C:\Users\there\Documents\OneTrainer> git stash show -p
diff --git a/requirements-cuda.txt b/requirements-cuda.txt
index c8ad93d..81dbd75 100644
--- a/requirements-cuda.txt
+++ b/requirements-cuda.txt
@@ -1,11 +1,11 @@
# pytorch
--extra-index-url https://download.pytorch.org/whl/cu124
-torch==2.5.1+cu124
-torchvision==0.20.1+cu124
-onnxruntime-gpu==1.19.2
+torch==2.6.0+cu124
+torchvision==0.21.0+cu124
+onnxruntime-gpu==1.20.1 When the installer runs again, xformers fails to find torch. Collecting xformers==0.0.28.post3 (from -r C:\Users\there\Documents\OneTrainer\requirements-cuda.txt (line 8))
Using cached xformers-0.0.28.post3.tar.gz (7.8 MB)
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 "C:\Users\there\Documents\OneTrainer\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
~~~~^^
File "C:\Users\there\Documents\OneTrainer\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\there\Documents\OneTrainer\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\there\AppData\Local\Temp\pip-build-env-txx9c8nl\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\there\AppData\Local\Temp\pip-build-env-txx9c8nl\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "C:\Users\there\AppData\Local\Temp\pip-build-env-txx9c8nl\overlay\Lib\site-packages\setuptools\build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\there\AppData\Local\Temp\pip-build-env-txx9c8nl\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 24, in <module>
ModuleNotFoundError: No module named 'torch'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. I tried to resolve this by manually installing torch I use kohya on this machine, so I already have a later version of xformers installed. At this point, I just manually installed each component in requirements.txt (requirement-default.txt and requirement-cuda.txt files) separately rather than running the install script. I can get all the way to the mgds issue the OP posted. I also had to manually install pip, Visual Studio, and rustup to install Numpy. This seems to be a known issue with Windows and xformers. Even with xformers resolved (or at least skipped), sentencepiece (which the xformers thread also mentions) fails to install. There's a cmake error I don't know enough about to even explain. Collecting sentencepiece==0.2.0 (from -r C:\Users\there\Documents\OneTrainer\requirements-global.txt (line 21))
Using cached sentencepiece-0.2.0.tar.gz (2.6 MB)
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
╰─> [32 lines of output]
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\there\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\cmake.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'cmake'
Traceback (most recent call last):
File "C:\Users\there\Documents\OneTrainer\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
~~~~^^
File "C:\Users\there\Documents\OneTrainer\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\there\Documents\OneTrainer\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\there\AppData\Local\Temp\pip-build-env-yfzl9o3e\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\there\AppData\Local\Temp\pip-build-env-yfzl9o3e\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "C:\Users\there\AppData\Local\Temp\pip-build-env-yfzl9o3e\overlay\Lib\site-packages\setuptools\build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\there\AppData\Local\Temp\pip-build-env-yfzl9o3e\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "<string>", line 128, in <module>
File "C:\Users\there\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 419, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'sentencepiece', '-A', 'x64', '-B', 'build', '-DSPM_ENABLE_SHARED=OFF', '-DCMAKE_INSTALL_PREFIX=build\\root']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. Note this is on my Windows machine. I installed this on my Mac with no issues. But Windows has the NVidia video card, so I'd love to use that instead. |
This comment has been minimized.
This comment has been minimized.
We explicitly do not support 3.13 Tr1dae. Read the repos README next time |
Thanks for the hint @Tr1dae . I was able to install Python 3.12 then create a 3.12 environment to work in. cd C:\Users\there\OneTrainer
virtualenv.exe -p C:\Users\there\AppData\Local\Programs\Python\Python312\python.exe python312
.\python312\Scripts\activate
.\install.bat My Mac is running Python 3.12.7 so that's probably why it has no issues. Windows is installing right now. Devs, would it be possible to add a Python version check to the installer so it can halt installation with a more obvious error message? That way people don't bother you because they installed the most recent version of Python. Either way, I'm all set, feel free to close this thread. |
bro - cut the sass. I was helping a error thread that went un-answered. Not like I intentionally went to try running 3.13 expecting it to work . |
I am unsure how you are unaware of Python 3.13 global installation—since global installs are manual, so that doesnt add up. Thank you for helping this user |
clearly I wasn't the only one that forgot about a previous install in a sea of various installs when running multiple different things from all over. Your little passive-aggressive comments aren't helping. Next time check your tone. |
What happened?
I am trying to install OneTrainer.
It stops on this error:
I tried installing it manually with
python -m pip install mgds
but I get this error:What did you expect would happen?
start
Relevant log output
Output of
pip freeze
( I don't know how to do that )
The text was updated successfully, but these errors were encountered: