mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-12 17:57:38 +00:00
Fix invalid escape sequence (#17145)
### Description
- Removed one unused import
- Escaped a backslash in a path
### Motivation and Context
I see this `DeprecationWarning` when I import `onnxruntime`:
```
onnxruntime/capi/_pybind_state.py:28: DeprecationWarning: invalid escape sequence '\S'
"(other than %SystemRoot%\System32), "
```
A future version of Python (maybe 3.13?) will raise a `SyntaxError` for
invalid escape sequences.
This commit is contained in:
parent
3aba736ee2
commit
90754fc077
1 changed files with 1 additions and 2 deletions
|
|
@ -7,7 +7,6 @@ Ensure that dependencies are available and then load the extension module.
|
|||
"""
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
from . import _ld_preload # noqa: F401
|
||||
|
|
@ -25,7 +24,7 @@ if platform.system() == "Windows":
|
|||
if not os.path.isfile(os.path.join(system_root, "System32", "vcruntime140_1.dll")):
|
||||
warnings.warn("Please install the 2019 Visual C++ runtime and then try again. "
|
||||
"If you've installed the runtime in a non-standard location "
|
||||
"(other than %SystemRoot%\System32), "
|
||||
"(other than %SystemRoot%\\System32), "
|
||||
"make sure it can be found by setting the correct path.")
|
||||
|
||||
@ONNXRUNTIME_IMPORT_PYTORCH_TO_RESOLVE_DLLS@
|
||||
|
|
|
|||
Loading…
Reference in a new issue