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

Installation problem with deepseed and install.sh #86

Open
titusfx opened this issue Jul 16, 2024 · 1 comment
Open

Installation problem with deepseed and install.sh #86

titusfx opened this issue Jul 16, 2024 · 1 comment

Comments

@titusfx
Copy link

titusfx commented Jul 16, 2024

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
Copy link
Author

titusfx commented Jul 16, 2024

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)

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

1 participant