Installing virtualenvwrapper on Windows
Question:
I’ve installed virtualenv and virtualenvwrapper on Windows using easy_install. But mkvirtualenv
is missing. I tried to search on my machine but I couldn’t find it. I don’t know how to solve it. Do you have any idea?
Answers:
mkvirtualenv is a bash script so you need to run bash shell to make use of it.
mkvirtualenv is a bash function in the mkvirtualenv_bashrc script
You will need to run this from cygwin under Windows. (You can call a native python from this and not need a cygwin python)
I’ve ported virtualenvwrapper to Powershell. Grab it from the BitBucket repo!
virtualenv helpers for Windows command shell:
-
virtualenvwrapper-win is a set of DOS-style batch files (doesn’t work in PowerShell).
-
In windows we need to use virtualenv
not mkvirtualenv
while creating virtual environments
What worked for me (speaking in 2021) is the following:
- Clone the virtualenvwrapper-powershell git repo
- Navigate to the folder "virtualenvwrapper-powershell"
- Open PowerShell there, if you haven’t navigated there via PowerShell itself, and execute the command
./Install.ps1
- Restart PowerShell and that’s it: you should see a success message like "Virtual Env Wrapper for Powershell activated"
I’ve installed virtualenv and virtualenvwrapper on Windows using easy_install. But mkvirtualenv
is missing. I tried to search on my machine but I couldn’t find it. I don’t know how to solve it. Do you have any idea?
mkvirtualenv is a bash script so you need to run bash shell to make use of it.
mkvirtualenv is a bash function in the mkvirtualenv_bashrc script
You will need to run this from cygwin under Windows. (You can call a native python from this and not need a cygwin python)
I’ve ported virtualenvwrapper to Powershell. Grab it from the BitBucket repo!
virtualenv helpers for Windows command shell:
-
virtualenvwrapper-win is a set of DOS-style batch files (doesn’t work in PowerShell).
In windows we need to use virtualenv
not mkvirtualenv
while creating virtual environments
What worked for me (speaking in 2021) is the following:
- Clone the virtualenvwrapper-powershell git repo
- Navigate to the folder "virtualenvwrapper-powershell"
- Open PowerShell there, if you haven’t navigated there via PowerShell itself, and execute the command
./Install.ps1
- Restart PowerShell and that’s it: you should see a success message like "Virtual Env Wrapper for Powershell activated"