Import virtualenvwrapper error in Powershell
I have python 2.7 installed as well as pip and I am running PowerShell as administrator.
I did:
pip install virtualenv
and
pip install virtualenvwrapper-powershell
and both were successful.
I also did this:
mkdir '~ .virtualenvs'
However, when I try:
The virtualenvwrapper import module
it always gets me this error: Import-module: special module "virtualenvwrapper" was not loaded because no valid module file was found in any module directory.
I tried to install virtualenvwrapper-powershell again to make sure and I got this: Requirement already met (use --upgrade to upgrade): virtualenvwrapper-powershell in c: \ python27 \ lib \ site-packages directory
What could be wrong?
source to share
I met the same problem when I was trying to do the same as you. I finally figured it out. I found that the virtualenvwrapper I installed is somehow not in the current folder (C :). Instead, it is hidden in a folder:
C:\Python27\Lib\site-packages\Users\*myusername*\Documents\WindowsPowerShell\Modules\VirtualEnvWrapper
I recommend that you go to the Python folder and try to find something like
"\Lib\site-packages\Users\*myusername*\Documents\WindowsPowerShell\Modules\"
and if you can find the VirtualEnvWrapper module then when you enter the command you just need to give the full path.
Hope this helps.
source to share
You should follow the installation instructions http://newcoder.io/begin/setup-your-machine/#windows . So do I. This is how I fixed it:
- From Powershell enter "Get-ChildItem Env: PSModulePath" The value of this variable tells you the folder that Powershell looks like when importing modules.
- pip installed my module to "C: \ Python27 \ Lib \ site-packages \ Users \\ Documents \ WindowsPowerShell \ Modules \ virtualenvwrapper"
- Copy this folder to the folder from step # 1
- Restart Powershell
source to share
It helped me a lot
After going to pc -> C: -> Python27 -> Lib -> site-packages -> users -> * Your user * -> WindowsPowerShell -> Modules -> Copy VirtualEnvWrapper
In the homemade directory in the docs, WindowsPowerShell is called and then create Modules inside it Copy the VirtualEnvWrapper folder inside this.
then cancel set-executionpolicy no limit in CMD like ADMINISTRATOR !!!
followed by the virtual module Import-Module
and you must be 100%
source to share
I had the same problem today on a new 10 win system. For some reason, VirtualEnvWrapper creates a user folder in the Site Packages folder inside your Python installation, where it cannot be found. Just moving Modules with all the content did the trick. -> (in my case from :)
C:\Program Files (x86)\Python27\Lib\site-packages\Users\*USER*\Documents\WindowsPowerShell\**Modules**\VirtualEnvWrapper
-> to C:\Users\*USER*\Documents\WindowsPowerShell\**Modules**\VirtualEnvWrapper
.. with a trick ... where your powershell profile can find it;)
source to share