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

'torch._C' is not a package #1308

Closed
mrseeker opened this issue Aug 16, 2021 · 3 comments
Closed

'torch._C' is not a package #1308

mrseeker opened this issue Aug 16, 2021 · 3 comments

Comments

@mrseeker
Copy link

For some unknown reason I cannot get deepspeed to run on my computer, I seem to get the following error:

(venv) julius@big-bertha:~/Documents/projects/DeepSpeed/dist$ python -m deepspeed.env_report
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/home/julius/Documents/projects/food/venv/lib/python3.8/site-packages/deepspeed/__init__.py", line 12, in <module>
    from .runtime.engine import DeepSpeedEngine
  File "/home/julius/Documents/projects/food/venv/lib/python3.8/site-packages/deepspeed/runtime/engine.py", line 16, in <module>
    from torch.distributed.distributed_c10d import _get_global_rank
  File "/home/julius/Documents/projects/food/venv/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 15, in <module>
    from .constants import default_pg_timeout
  File "/home/julius/Documents/projects/food/venv/lib/python3.8/site-packages/torch/distributed/constants.py", line 1, in <module>
    from torch._C._distributed_c10d import _DEFAULT_PG_TIMEOUT
ModuleNotFoundError: No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package

I am unsure what is causing this "torch._C" is not a package, but I think it has something to do with https://bugs.python.org/issue43367.

Do you guys have any recommendations on how to solve this problem?

@tjruwase
Copy link
Contributor

@mrseeker, could it be related to this?

@khaotik
Copy link

khaotik commented May 28, 2022

I managed to fixed this problem by compiling torch with distributed support. Setting cmake flags USE_DISTRIBUTED=ON fixes. torch.distributed.is_available() can be check availability. Would be great if DeepSeed makes torch.distributed dependency optional.

@loadams
Copy link
Contributor

loadams commented Aug 14, 2023

Closing as this is a stale issue and likely related to a very old version of torch.

If you are still having similar issues, please open a new issue and link this one and we can take a look with a repro.

@loadams loadams closed this as completed Aug 14, 2023
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

4 participants