Closed zalzac closed 2 years ago
Interesting - not seeing any changes in 1.4.6 that would cause this (https://github.com/Fizzadar/pyinfra/compare/v1.4.5...v1.4.6#diff-e65abf13e1f9e3f55570f9ae8167cc22b6c16a48ea43ffde761f7d58095b1567).
If you re-run on 1.4.6/2.3 does the problem still remain? The operation should just check for ~/envs/calc/bin/active
and if present it'll skip the virtualenv creation step.
Other useful info: is the target machine a VM/Docker container/similar? Is it possble to repro using a Docker container?
I am unable to reproduce using the latest 2.4 version.
$ pyinfra --version
pyinfra: v2.4
$ cat repro.py
from pyinfra.operations import pip
pip.packages(
requirements="~/ansible/requirements.txt",
virtualenv="~/ansible/venv",
)
And the output of running pyinfra -vv @local repro.py
[@local] >>> sh -c '~/ansible/venv/bin/pip install -r ~/ansible/requirements.txt'
[@local] Success
Closing, as above this appears to work and without more info cannot debug.
Describe the bug
pip.packages
withvirtualenv
parameter returns errorsh: 1: virtualenv: not found
. It's similar to #567 except rerunning the deploy also results in an error.The deploy script was working fine in my old version 1.4.1. I noticed the error after I updated pyinfra to the latest version 2.3. I investigated further which version caused the regression and 1.4.5 is the last version where I don't have this error. It appears on 1.4.6 and later.
To Reproduce
Expected behavior
pyinfra installs packages from the requirements.txt into a specified environment.
Meta
pyinfra --support
output with
-vv
(1.4.5)output with
-vv
(1.4.6 and 2.3)