Attributeerror: Module 'Os' Has No Attribute 'Add_Dll_Directory'

Attributeerror: Module 'Os' Has No Attribute 'Add_Dll_Directory'

ERROR

I am trying to clone my voice using ML. I am following : repository. But at the third step of Setup that is when I run the command python demo_cli.py I am getting the error: AttributeError: module 'os' has no attribute 'add_dll_directory'. My python version is 3.7.9 and my machine do not have a gpu.

1 Answer

The function os.add_dll_directory was introduced in Python 3.8. It's not available in your version, Python 3.7.

To use that function, you'll need to upgrade to Python 3.8 or later.

Since it's being used from within PyTorch, it's possible that this is due to an incompatible version of PyTorch being used. Downgrading your PyTorch version may solve that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.