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

! #8042

Closed
Horizon114514 opened this issue Oct 27, 2024 · 2 comments
Closed

! #8042

Horizon114514 opened this issue Oct 27, 2024 · 2 comments

Comments

@Horizon114514
Copy link

[Window Title]
devenv.exe

[Main Instruction]
发生意外错误

[Content]
请按 Ctrl+C 复制此对话框的内容并向我们的问题跟踪程序报告此错误。

[^] 隐藏详细信息(D) [关闭(C)]

[Expanded Information]

Build: 17.0.24138.2

System.IO.DirectoryNotFoundException: 未能找到路径“D:\Program Files\Python3.12.1\Lib”的一部分。
   在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   在 System.IO.FileSystemEnumerableIterator`1.CommonInit()
   在 System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   在 System.IO.Directory.EnumerateDirectories(String path, String searchPattern, SearchOption searchOption)
   在 Microsoft.PythonTools.Interpreter.PackageManagerFactoryExtensions.<GetModulesInLib>d__1.MoveNext()
   在 Microsoft.PythonTools.Interpreter.PackageManagerFactoryExtensions.<>c__DisplayClass0_0.<HasModuleAsync>b__0()
   在 System.Threading.Tasks.Task`1.InnerInvoke()
   在 System.Threading.Tasks.Task.Execute()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Microsoft.PythonTools.Interpreter.PackageManagerFactoryExtensions.<HasModuleAsync>d__0.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Microsoft.PythonTools.Environments.AddVirtualEnvironmentView.<UpdateInterpreterAsync>d__114.MoveNext()
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
   在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Microsoft.PythonTools.Infrastructure.VSTaskExtensions.<HandleAllExceptions>d__5.MoveNext()
@StellaHuang95
Copy link
Contributor

The System.IO.DirectoryNotFoundException error indicates that PTVS cannot locate the Python 3.12 installation path (D:\Program Files\Python3.12.1\Lib). This may happen if Python has been moved or the path in Visual Studio’s Python environment settings does not match the actual location of Python 3.12. Could you check if your Python 3.12 is installed in the D:\Program Files\Python3.12.1? If not, please try manually setting the interpreter path to the correct location on the Add Environment page. Image

Copy link

This issue was closed because it has been stalled for 30 days with no activity. If the issue still persists, please reopen with the information requested. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants