microsoft / PTVS

Python Tools for Visual Studio
https://aka.ms/PTVS
Apache License 2.0
2.53k stars 675 forks source link

conda installation not recognized w/in VS 2022 #7809

Closed AxelBL closed 9 months ago

AxelBL commented 9 months ago

[Window Title] devenv.exe

[Main Instruction] An unexpected error occurred

[Content] Please press Ctrl+C to copy the contents of this dialog and report this error to our issue tracker.

[^] Hide details [Close]

[Expanded Information]

Build: 17.0.23314.1

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\ablin\miniconda3\envs\Lib'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.EnumerateDirectories(String path, String searchPattern, SearchOption searchOption)
   at Microsoft.PythonTools.Interpreter.PackageManagerFactoryExtensions.<GetModulesInLib>d__1.MoveNext()
   at Microsoft.PythonTools.Interpreter.PackageManagerFactoryExtensions.<>c__DisplayClass0_0.<HasModuleAsync>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.Interpreter.PackageManagerFactoryExtensions.<HasModuleAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.Environments.AddVirtualEnvironmentView.<UpdateInterpreterAsync>d__114.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.Infrastructure.VSTaskExtensions.<HandleAllExceptions>d__5.MoveNext()

Describe the bug Local minicoda installation does not get recognized by VS 2022. Steps to Reproduce

  1. When clicking on PythonEnvironments/Conda, the above error occurs.

Expected behavior conda installation is recognized and new conda envs can get created from within VS.

Configuration information (If you are providing a diagnostics file (see below), skip this section) VS Version: Version 17.9.0 Preview 2.1 Microsoft Visual Studio Community 2022 Version 17.9.0 Preview 2.1 VisualStudio.17.Preview/17.9.0-pre.2.1+34414.90 Microsoft .NET Framework Version 4.8.09032

Installed Version: Community

Visual C++ 2022 00482-90000-00000-AA531 Microsoft Visual C++ 2022

ADL Tools Service Provider 1.0 This package contains services used by Data Lake tools

ASA Service Provider 1.0

ASP.NET and Web Tools 17.9.153.1332 ASP.NET and Web Tools

Azure App Service Tools v3.0.0 17.9.153.1332 Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio 2.6.5000.0 Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools 17.9.153.1332 Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio 2.6.5000.0 Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 4.9.0-2.23613.5+47b0a1e0ab831076eda00bb1e24b9d042d256e17 C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Cookiecutter 17.0.23314.1 Provides tools for finding, instantiating and customizing templates in cookiecutter format.

GitHub Copilot 1.149.0.0 (v1.149.0.0@9a0f75deb) GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.

GitHub Copilot Agent 1.149.0

Markdown Editor v2 2.0.149 A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

Microsoft Azure Hive Query Language Service 2.6.5000.0 Language service for Hive query

Microsoft Azure Stream Analytics Language Service 2.6.5000.0 Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio 2.9 Support for Azure Cloud Services projects

Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager 6.9.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Python - Django support 17.0.23314.1 Provides templates and integration for the Django web framework.

Python - Profiling support 17.0.23314.1 Profiling support for Python projects.

Python - VC Project Support 17.0.23055.1 Provides support for launching C++ projects with Python debugging enabled.

Python with Pylance 17.0.23314.1 Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Razor (ASP.NET Core) 17.9.2.2357901+dfac5e3cec112dd38af95d899f85347f2e64411a Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools 17.9.39.0 Microsoft SQL Server Data Tools

Test Adapter for Boost.Test 1.0 Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0 Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

ToolWindowHostedEditor 1.0 Hosting json editor into a tool window

TypeScript Tools 17.0.21025.2001 TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.9.0-2.23613.5+47b0a1e0ab831076eda00bb1e24b9d042d256e17 Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.8.0-beta.23570.1+e9491ad27f8c9399cdd68e2308e906851a6db84f Microsoft Visual F# Tools

Visual Studio IntelliCode 2.2 AI-assisted development for Visual Studio.

judej commented 9 months ago

Thanks for the report, unfortunately, this is not enough data for us to debug.

If this continues to be a problem, would you please reopen the issue and add the information in the report as described in the troubleshooting guide?