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


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

import-module : The specified module ‘virtualenvwrapper’ was not
loaded because no valid module file was found in any module directory.

At line:1 char:1

  • import-module virtualenvwrapper
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : ResourceUnavailable: (virtualenvwrapper:String) [Import-Module], FileNotFoundException
    • FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

I’m at a real loss at what to do here, because as far as I can tell from this guide and others this step should be rather straight-forward. Googling this problem hasn’t really helped me here since I can’t find anyone else with this problem.


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.


Installing virtualenvwrapper-powershell in Windows 8.1, import-module failing by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply