Closed CWhite1 closed 1 year ago
@atalman can you help look into it? It seems torch 2.0.1 is not on pypi website yet, is that expected?
I just tried the repro and it worked fine, but I see some differences than what's in report, which I do not think is critical.
I also inspected the content of https://download.pytorch.org/whl/cpu/torchaudio-2.0.1%2Bcpu-cp310-cp310-win_amd64.whl, and I verify that the said library file is part of the package.
So this looks more like issue with runtime environment.
@CWhite1
First, can you check if the said file exist? If installed properly, it should be there, but I cannot quite tell.
Secondly, what I found peculiar is that your stack trace has seemingly mixed Python env. The last line has WindowsApps
in the path, while the others are not. I don't use virtual env other than conda, so I cannot tell if it's normal. If there is an interpreter mixed along the way, then it is possible that the error message inaccurate and what really is happening is Python finds the library file but failed to load it.
Curious to know how you could fix this issue @CWhite1 - I am running in to the same issue. I see the following:
File "C:\Users\Owner\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torchaudio\_extension\__init__.py", line 43, in <module>
_load_lib("libtorchaudio")
File "C:\Users\Owner\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torchaudio\_extension\utils.py", line 61, in _load_lib
torch.ops.load_library(path)
File "C:\Users\Owner\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torch\_ops.py", line 643, in load_library
ctypes.CDLL(path)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\ctypes\__init__.py", line 376, in __init__
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: Could not find module 'C:\Users\Owner\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\torchaudio\lib\libtorchaudio.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
🐛 Describe the bug
Description of Bug
I'm encountering an issue when using the bark library, which relies on torchaudio. When I try to run the code that imports and uses bark, I receive the following error message: An issue with the missing libtorchaudio.pyd file still persists.
FileNotFoundError: Could not find module 'C:\Users\chris\Downloads\GPTbarkAsssist\myenv\Lib\site-packages\torchaudio\lib\libtorchaudio.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
Steps to reproduce:
Attempted solutions:
I have tried reinstalling torch and torchaudio multiple times, both globally and within a virtual environment. I have also tried installing different versions of torch and torchaudio, as well as creating a number of virtual environments in various folders with the same result of a missing libtorchaudio.pyd file . I've received guidance from an AI assistant to try various solutions, but none have resolved the issue so far.
Python Sample Code: (Program I am building more complicated that this, but this was simple test with same result)
Full Traceback
Versions