xtts-webui icon indicating copy to clipboard operation
xtts-webui copied to clipboard

Installation problem with deepseed and install.sh

Open titusfx opened this issue 1 year ago • 1 comments

I encountered an error while trying to install deepspeed==0.11.2 using pip. The installation process fails with the following error message (using install.sh and manual installation):

Running command python setup.py egg_info Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-dugbwdgo/deepspeed_ad626ffd4fc246ea8ec07c488c147976/setup.py", line 100, in cuda_major_ver, cuda_minor_ver = installed_cuda_version() File "/tmp/pip-install-dugbwdgo/deepspeed_ad626ffd4fc246ea8ec07c488c147976/op_builder/builder.py", line 39, in installed_cuda_version import torch.utils.cpp_extension File "AI_installs/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 28, in from pkg_resources import packaging # type: ignore[attr-defined] ImportError: cannot import name 'packaging' from 'pkg_resources' (AI_installs/venv/lib/python3.10/site-packages/pkg_resources/init.py) error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> See above for output.

This error seems to stem from the pkg_resources module not being able to import packaging. This might be due to missing or outdated dependencies.

titusfx avatar Jul 16 '24 08:07 titusfx

Solution To resolve this issue, I follow these steps:

Update pip, setuptools, and wheel: Ensure you have the latest versions of pip, setuptools, and wheel installed. Run the following commands:

pip install --upgrade pip setuptools wheel Install or Upgrade packaging Module: Ensure that the packaging module is installed and up to date:

pip install --upgrade packaging Check and Reinstall pkg_resources: pkg_resources is part of the setuptools package, so updating setuptools should resolve any issues:

pip install --upgrade setuptools Recreate Virtual Environment: Sometimes, issues can arise from a corrupted virtual environment. Recreating it can help:

deactivate rm -rf venv python -m venv venv source venv/bin/activate Install deepspeed Again: Now, try to install deepspeed again:

pip install deepspeed==0.11.2 By following these steps, you should be able to resolve the import error and successfully install deepspeed. If the issue persists, please provide detailed error logs to the deepspeed support or community forums for further assistance.

and then the manual installation ( in that order)

titusfx avatar Jul 16 '24 08:07 titusfx