2

Other such posts didn't solve my error. I followed this post to install virtualenv and virtualenvwrapper . Now when try running mkvirtualenv Addon-Tests in my project's root directory, I get an error : ERROR: virtualenvwrapper could not find virtualenv in your path I followed all other such questions but none of them solved it.

I had added this to my .bashrc file as instructed in that blog

export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

1 Answers1

0

If you've already installed virtualenv, you likely didn't use sudo and installed it locally.

If this is the case, including the line export VIRTUALENVWRAPPER_VIRTUALENV=~/.local/bin/virtualenv to let virtualenvwrapper know where the command is will likely fix your issue. (You can check ~/.local/bin/ or run ~/.local/bin/virtualenv --help first to make sure it's there.)

(Note that using an alias to python3 -m virtualenv will not work here - virtualenvwrapper is expecting an executable.)

Alternatively, you can add ~/.local/bin/ to your path by adding export PATH="$HOME/.local/bin:$PATH" to your ~/.bashrc and re-sourcing it. Either should work.

Pro Q
  • 228