To build .NET apps, you need to download and install the .NET 6 SDK (Software Development Kit).
Download .NET 6 SDK (64-bit)
Arm64 下载
如果使用的是带有 Apple M1 芯片的 Mac,则需要安装 Arm64 版本的 SDK。
ML.NET 命令行接口(CLI),提供用于通过 ML.NET 构建机器学习模型的工具。
Note: Currently, ML.NET CLI is in Preview and only supports the latest LTS version of the .NET SDK (.NET 6).
Once you've installed the .NET 6 SDK, open a new terminal and run the following command if you're on a x64 machine:
dotnet tool install -g mlnet-osx-x64
对于 ARM64 芯片体系结构,请改为运行以下命令:
dotnet tool install -g mlnet-osx-arm64
If the tool installs successfully, you should see an output message where [arch]
is the chip architecture similar to the following:
You can invoke the tool using the following command: mlnet
Tool 'mlnet-osx-[arch]' (version '16.14.3') was successfully installed.
Note: If you're using a console other than Bash (for example, zsh, which is the new default for macOS), then you'll need to give mlnet
executable permissions and include mlnet
to the system path. Instructions on how to do this should appear in the terminal when you install mlnet (or any global tool). In general, the following command should work for most systems: chmod +x [PATH-TO-MLNET-CLI-EXECUTABLE]
或者,可以尝试使用以下命令运行 mlnet 工具:
~/.dotnet/tools/mlnet
如果该命令仍显示错误,请使用下面的“我遇到了问题”按钮报告问题并获取解决问题的帮助。