Home > Net >  zsh: command not found: virtualenv in Window Subsystem For Linux (WSL)
zsh: command not found: virtualenv in Window Subsystem For Linux (WSL)

Time:10-05

I recently switched to WSL2 and using Ubuntu 20.04.3 LTS after that I installed pip and later I installed virtualenv using pip install virtualenv, it successfully installed the package but when I am trying to create a virtual environment, it is not working I am getting this error:

Error

NOTE
I am using zsh shell with oh-my-zsh

Current Path of virtualenv

/home/<myUsername>/.local/bin/virtualenv

CodePudding user response:

I solved my problem by uncommenting

export PATH=$HOME/bin:/usr/local/bin:$PATH from .zshrc file and adding :$HOME/.local/bin

FINAL COMMAND
export PATH=$HOME/bin:/usr/local/bin:$PATH:$HOME/.local/bin

  • Related