1

I am using powershell. I successfully installed virtualenvwrapper-powershell.

But when I typed 'Import-Module virtualenvwrapper', I got an error as following:

PS C:\Python27> Import-Module virtualenvwrapper 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

It would be great if you could give me some advice...

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
Suzuki Soma
  • 519
  • 1
  • 8
  • 16

2 Answers2

1

You need to paste the VirtualEnvWrapper folder in the following directory. It works for me

**

` C:\Windows\System32\WindowsPowerShell\v1.0\Modules

`

**

Tonmoy
  • 11
  • 3
0

You need to either store the module in a folder with the same name as the module or you need to use .psm1 with the import command. For your case, you need to store the module in the following path

C:/Python27/virtualenvwrapper/virtualenvwrapper.psm1

and therefore you can use this command

Import-Module virtualenvwrapper

or call your module using this command

Import-Module virtualenvwrapper.psm1

If neither of these works, then you might find this link helpful installing virtualenvwrapper

Community
  • 1
  • 1
BICube
  • 4,451
  • 1
  • 23
  • 44
  • Thanks Ala, I followed your advice. But the same error still happens.. PS C:\python27> Import-Module virtualenvwrapper.psm1 Import-Module : The specified module 'virtualenvwrapper.psm1' was not loaded because no valid module file was found in any module directory. At line:1 char:1 + Import-Module virtualenvwrapper.psm1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (virtualenvwrapper.psm1:String) [Import-Module], FileNotFoundExcept ion + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand – Suzuki Soma Jun 28 '15 at 07:17
  • @SuzukiSoma can you actually see the virtualenvwrapper.psm1 file directly under C:/Python27 directory?. If no, which is mostly the case, then you need to write the full path to the module. For example, if your module in C:/PowershellModules, then you need to say this Import-Module C:\PowershellModules\virtualenvwrapper.psm1 – BICube Jun 28 '15 at 07:22
  • yes! there is definitely a file 'virtualenvwrapper.psm1' under directly "C:\Python27" .. – Suzuki Soma Jun 28 '15 at 07:29
  • OMG, I reffered exactly same page as him (http://newcoder.io/begin/setup-your-machine/#windows) – Suzuki Soma Jun 28 '15 at 07:51
  • Ok! I will try to followe the step which the page you provided shows – Suzuki Soma Jun 28 '15 at 07:52
  • @SuzukiSoma If your powershell scripts are unsigned and you are on a strict execution policy you won't be able to import the module. – seanmus Mar 09 '16 at 22:19