Closed cycychenyi closed 2 years ago
I can confirm this behaviour. As a workaround you could install pip-chill
inside the virtualenv. In case you have pip-chill
installed globally and inside the virtualenv, you need to exit and reenter the virtual environment in order to use the local pip-chill
$ pip install pip-chill
$ mkvirtualenv pipchillvenv
(pipchillvenv) $ pip install ansible-core pip-chill
(pipchillvenv) $ pip-chill
ansible-core==2.11.4
ansible-lint==5.2.1
commitizen==2.17.9
molecule-docker==1.1.0
pip-autoremove==0.9.1
pip-chill==1.0.1
pre-commit==2.13.0
virtualenvwrapper==4.8.4
yamllint==1.26.3
# as noted, running pip-chill directly will use the global
# instead of the local pip-chill
(pipchillvenv) $ deactivate
$ workon pipchillvenv
(pipchillvenv) $ pip-chill
ansible-core==2.12.0
pip-chill==1.0.1
@fgierlinger Thank you for response! A few days ago I reinstall Windows for some reasons, pip-chill
can work perfectly in virtual environments now.
Is there a way to make pip-chill global and don't include global packages? Installing it in the venv have the small drawback of having pip-chill in the requirements.txt file.
Environment
Description
I run
pip-chill
in a Python virtual environment, but it seems to output the results of the Python global environment.What I Did