You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
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.
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.
The text was updated successfully, but these errors were encountered: