Installing virtualenvwrapper-powershell in Windows 8.1, import-module failing

前端 未结 2 1626
囚心锁ツ
囚心锁ツ 2021-01-06 04:46

I\'m trying to follow the guide here, and I\'m stuck at Import-Module virtualenvwrapper, where PowerShell keeps giving me the error:

impo

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-06 05:47

    Well, I've actually figured my way around this issue. I guess the pip install never placed the files in a correct module directory for PowerShell. I created a WindowsPowerShell\Modules folder in my documents folder, which did not exist but was listed in my PowerShell modules path. I then took the VirtualEnvWrapper directory from the virtualenvwrapper-powershell bitbucket and copied it into the Modules folder I just created.

    Then I had to use Set-ExecutionPolicy Unrestricted instead of Set-ExecutionPolicy RemoteSigned as shown in the guide, but I was then able to do the import-module and use everything needed. I'm not sure why I had to all of this manually instead of pip having done it, but I just hope this can somehow help someone else.

提交回复
热议问题