-2

我下载了 cntk 2.0 beta 7。在执行 .\install.ps1 时,出现 install.ps1 未进行数字签名的错误:

Windows PowerShell 版权所有 (C) 2016 Microsoft Corporation。版权所有。

PS C:> cd .\local\cntk\Scripts\install\windows\ PS C:\local\cntk\Scripts\install\windows> .\install.ps1 .\install.ps1 : 文件 C:\local\cntk\ Scripts\install\windows\install.ps1 无法加载。文件 C:\local\cntk\Scripts\install\windows\install.ps1 未进行数字签名。您不能在当前系统上运行此脚本。有关运行脚本和设置执行策略的详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=135170上的 about_Execution_Policies 。在 line:1 char:1 + .\install.ps1 + ~~~~~~~~~~~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess


如果我启动 powershell -executionpolicy unrestricted install.ps1 能够运行但没有安装任何东西,这里是输出:

This script will setup the CNTK prequisites and the CNTK Python environment onto the machine.
More help is given by calling 'get-help .\install.ps1' in your powershell environment.

The script will analyse your machine and will determine which components are required.
The required components will be downloaded in [C:\local\cntk\Scripts\install\windows\InstallCache]
Repeated operation of this script will reuse already downloaded components.

 - If required VS2012 Runtime and VS2013 Runtime will be installed
 - If required MSMPI will be installed
 - Anaconda3 will be installed into [C:\local\Anaconda3-4.1.1-Windows-x86_64]
 - A CNTK-PY34 environment will be created or updated in [C:\local\Anaconda3-4.1.1-Windows-x86_64\envs]
 - CNTK will be installed or updated in the CNTK-PY34 environment


The parameter '-Execute' hasn't be supplied to the script.
The script will execute withouth making any actual changes to the machine.


1 - I agree and want to continue
Q - Quit the installation process

1
Determining Operations to perform. This will take a moment...

The following operations will be performed:
 * Install Anaconda3-4.1.10
 * Setup CNTK PythonEnvironment 3.4
 * Setup/Update CNTK Wheel
 * Create CNTKPY34 batch file

Do you want to continue? (y/n)
y
Performing download operations
Downloading [https://repo.continuum.io/archive/Anaconda3-4.1.1-Windows-x86_64.exe], please be patient....
 ** Running in DEMOMODE - no download performed
Download operations finished

Performing install operations
Installing Anaconda3-4.1.1. This will take several minutes. Please be patient ....
** Running in DEMOMODE - setting Exit Code **: 0
** Running in DEMOMODE - setting Exit Code **: 0
Setup/Update of CNTK Wheel environment. Please be patient....
** Running in DEMOMODE - setting Exit Code **: 0
Create-Batch [C:\local\cntk\scripts\cntkpy34.bat]:No-Execute flag. No file created
Install operations finished
4

3 回答 3

2

请阅读 wiki 上的输出或文档!

“参数'-Execute'尚未提供给脚本。脚本将在不对机器进行任何实际更改的情况下执行”

运行脚本为.\install.ps1 -Execute

于 2017-01-07T08:07:21.770 回答
0
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

只需运行这个命令试试这个简单的修复!

于 2018-07-27T07:28:20.727 回答
0

我遇到了同样的错误,并使用 Microsoft 的签名工具对文件进行了数字签名。签名后,错误消失了。

https://msdn.microsoft.com/en-us/library/windows/desktop/aa387764(v=vs.85).aspx

“SignTool 作为 Windows SDK 的一部分提供......”

于 2017-07-12T12:00:27.453 回答