# ModuleNotFound error after ray.init()

**URL:** <https://discuss.ray.io/t/modulenotfound-error-after-ray-init/13795>\
**Category:** Ray Clusters\
**Created:** [February 21, 2024, 11:09pm UTC](https://discuss.ray.io/t/modulenotfound-error-after-ray-init/13795 "2024-02-21T23:09:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayer](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rayer](https://discuss.ray.io/u/rayer)\
**Post date:** [February 21, 2024, 11:09pm UTC](https://discuss.ray.io/t/modulenotfound-error-after-ray-init/13795/1 "2024-02-21T23:09:33Z")

</div>

Hello, I keep getting the "ModuleNotFoundError: No module named ‘ray.autoscaler.\_private.\_kubernetes’ " error after run ray.init() in python 3.10 (ubuntu), and have tried different versions of ray.  
Could someone please help?

Thanks!

> > > ray.init()  
> > > 2024-02-21 15:12:12,513 INFO worker.py:1489 – Connecting to existing Ray cluster at address: 100.64.90.136:6379…  
> > > 2024-02-21 15:12:12,661 INFO worker.py:1664 – Connected to Ray cluster. View the dashboard at 100.64.90.136:8265  
> > > RayContext(dashboard\_url=‘100.64.90.136:8265’, python\_version=‘3.10.13’, ray\_version=‘2.8.0’, ray\_commit=‘105355bd253d6538ed34d331f6a4bdf0e38ace3a’, protocol\_version=None)  
> > > 2024-02-21 15:12:12,698 WARNING worker.py:2052 – The autoscaler failed with the following error:  
> > > Traceback (most recent call last):  
> > > File “/home/ray/anaconda3/lib/python3.10/site-packages/ray/autoscaler/\_private/monitor.py”, line 585, in run  
> > > self.\_initialize\_autoscaler()  
> > > File “/home/ray/anaconda3/lib/python3.10/site-packages/ray/autoscaler/\_private/monitor.py”, line 231, in \_initialize\_autoscaler  
> > > self.autoscaler = StandardAutoscaler(  
> > > File “/home/ray/anaconda3/lib/python3.10/site-packages/ray/autoscaler/\_private/autoscaler.py”, line 250, in **init**  
> > > self.reset(errors\_fatal=True)  
> > > File “/home/ray/anaconda3/lib/python3.10/site-packages/ray/autoscaler/\_private/autoscaler.py”, line 1117, in reset  
> > > raise e  
> > > File “/home/ray/anaconda3/lib/python3.10/site-packages/ray/autoscaler/\_private/autoscaler.py”, line 1061, in reset  
> > > self.provider = \_get\_node\_provider(  
> > > File “/home/ray/anaconda3/lib/python3.10/site-packages/ray/autoscaler/\_private/providers.py”, line 250, in \_get\_node\_provider  
> > > provider\_cls = \_get\_node\_provider\_cls(provider\_config)  
> > > File “/home/ray/anaconda3/lib/python3.10/site-packages/ray/autoscaler/\_private/providers.py”, line 226, in \_get\_node\_provider\_cls  
> > > return importer(provider\_config)  
> > > File “/home/ray/anaconda3/lib/python3.10/site-packages/ray/autoscaler/\_private/providers.py”, line 88, in \_import\_kubernetes  
> > > from ray.autoscaler.\_private.\_kubernetes.node\_provider import KubernetesNodeProvider  
> > > ModuleNotFoundError: No module named ‘ray.autoscaler.\_private.\_kubernetes’
