在PyCharm設置我的終端是Windows PowerShell中,但是當我嘗試在終端使用的virtualenv:如何運行終端作爲管理員使用的virtualenv
Import-Module virtualenvwrapper
(我在啓動這個命令劇本,但只是單獨包括爲簡便起見,命令)
我得到以下錯誤:
Import-Module : File C:\Users\Sean\Documents\WindowsPowerShell\Modules\virtualenvwrapper\support.psm1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.
At line:1 char:14
+ Import-Module <<<< virtualenvwrapper
+ CategoryInfo : NotSpecified: (:) [Import-Module], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException,Microsoft.PowerShell.Commands.ImportModuleCommand
所以我嘗試啓用腳本執行(像我一樣對PowerShell的外面PyCharm的):
Set-ExecutionPolicy RemoteSigned
但得到以下錯誤(我運行的PowerShell作爲管理員)避免PyCharm之外這個錯誤:
Set-ExecutionPolicy : Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied.
At line:1 char:20
+ Set-ExecutionPolicy <<<< RemoteSigned
+ CategoryInfo : NotSpecified: (:) [Set-ExecutionPolicy], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
所以我能做些什麼才能夠從PyCharm終端使用virtualenv?
- Windows 7的
- 的Python 2.7
- PyCharm社區版3.0
您是否曾嘗試以管理員身份運行PyCharm? – Antony