我在执行。\ install.ps1时下载了cntk 2.0 beta 7.,安装.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未经过数字签名。您无法在当前运行此脚本 系统。有关运行脚本和设置执行策略的更多信息,请参阅about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170。 在行:1个字符:1 +。\ install.ps1 + ~~~~~~~~~~~~~ + CategoryInfo:SecurityError:(:) [],PSSecurityException + FullyQualifiedErrorId:UnauthorizedAccess
如果我启动powershell -executionpolicy不受限制 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
答案 0 :(得分:2)
请阅读wiki上的输出或文档!
"参数' -Execute'没有提供给脚本。该脚本将在不对机器进行任何实际更改的情况下执行"
将脚本作为.\install.ps1 -Execute
答案 1 :(得分:0)
我遇到了同样的错误,并使用Microsoft的sign-tool对文件进行数字签名。签名后,此错误消失了。
https://msdn.microsoft.com/en-us/library/windows/desktop/aa387764(v=vs.85).aspx
" SignTool作为Windows SDK的一部分提供..."
答案 2 :(得分:0)
int lineNumber = ...
IPath path = ...
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
IMarker marker = file.createMarker(IMarker.TEXT);
marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IDE.openEditor(page, marker);
marker.delete();
只需运行此命令 试试这个简单的解决方法!