dotnet / machinelearning-samples

Samples for ML.NET, an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
4.46k stars 2.68k forks source link

The specified framework 'Microsoft.NETCore.App', version '2.1.0' was not found. #637

Closed rasser900 closed 5 years ago

rasser900 commented 5 years ago

Problem encountered on https://dotnet.microsoft.com/learn/ml-dotnet/get-started-tutorial/train Operating System: Linux Ubuntu 19.04 - x64

So, after following the tutorial. When I get to actually training this model (or just run mlnet with no arguments) I just get a message

It was not possible to find any compatible framework version The specified framework 'Microsoft.NETCore.App', version '2.1.0' was not found.

  • No frameworks were found.

You can resolve the problem by installing the specified framework and/or SDK.

The .NET Core frameworks can be found at:

However, if I run dotnet --info

.NET Core SDK (reflecting any global.json): Version: 2.2.401 Commit: 729b316c13

Runtime Environment: OS Name: ubuntu OS Version: 19.04 OS Platform: Linux RID: ubuntu.19.04-x64 Base Path: /usr/share/dotnet/sdk/2.2.401/

Host (useful for support): Version: 2.2.6 Commit: 7dac9b1b51

.NET Core SDKs installed: 2.2.401 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.12 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.12 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.12 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

It clearly has a bunch of these NETCore.App installed.

eerhardt commented 5 years ago

Do you happen to have the DOTNET_ROOT variable set to something other than /usr/share/dotnet? If it is, can you either remove the env var, or ensure it is pointing to /usr/share/dotnet?

rasser900 commented 5 years ago

Do you happen to have the DOTNET_ROOT variable set to something other than /usr/share/dotnet? If it is, can you either remove the env var, or ensure it is pointing to /usr/share/dotnet?

Fixed it. Thanks! :D