Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid command '.' with virtualenv.install_package(installer='pip') #163

Open
jaraco opened this issue Jul 26, 2020 · 1 comment
Open
Labels

Comments

@jaraco
Copy link
Contributor

jaraco commented Jul 26, 2020

The readme indicates to use virtualenv.install_package('coverage', installer='pip'), but if I use that command as virtualenv.install_package('.', installer='pip'), it fails with Invalid command '.' and the command it's trying to run is pip -q . (no install command). That's unexpected. I would have expected installer='pip' to invoke pip install.

@smheidrich
Copy link

I had the same issue. Also, pytest-virtualenv using easy_install by default might not be such a good idea, considering it's deprecated in favor of pip.

For anyone else who has this issue, a workaround is to use the pytest-venv plugin instead, which uses pip and also does some other things better (IMHO), e.g. it uses pytest's own tmpdir fixture so the venv temp dir will always be under pytest's base temp dir and have pytest's tmpdir features like preserving the last N temp dirs, whereas pytest-virtualenv uses a homegrown temp dir in os.getenv("WORKSPACE") / /tmp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants