virtualenv in PowerShell?

后端 未结 13 2075
悲&欢浪女
悲&欢浪女 2020-12-12 20:32

Hi fellow pythonistas, there seems to be a problem when virtualenv is used in PowerShell.

When I try to activate my environment in PowerShell like..

> env

13条回答
  •  粉色の甜心
    2020-12-12 21:21

    Just 2 more suggestions:

    Because it is always problematic to weaken a security policy i would advice to do it the minimal way for Powershell: invoke Powershell not as administrator but as the user who wants to use the virtualenv functions. Type "set-executionpolicy -executionpolicy unrestricted -scope currentuser". This way the policy is changed only for one user and not for the whole machine.

    Secondly I would advice to download from github the sources "regisf/virtualenvwrapper-powershell". After download unpack the zip-file to a local directory and run the file "Install.ps1" inside. This will expand the Powershell profile permanently on your machine and hence enable the use of all "virtalenvwrapper-win" commands including "workon". After that you will not notice any difference in the behaviour of Powershell and the Commandshell concerning virtualenv.

提交回复
热议问题