I'm trying to install dependencies inside of tox, which I believe needs --system
(to install into tox's virtualenv instead of into pipenvs own virtualenv). See also #154.
However, pipenv sync
, which is the new way to install dependencies from Pipfile.lock
does not support --system
(it seems it was intentionally left out initially in #1463), so I have to resort to pipenv install
.
It seems it would be useful to support --system
for sync as well.
+1
I just tried aca8e1238e93aeb42ce20c660f3ec5d7ec4b5479 from @frostming's branch, and it works as expected in my usecase (see https://travis-ci.org/evolution-events/Artaxerxes/jobs/382857314). Thanks!
Hey, just in case pipenv uses Tox's virtualenv directly, with no intervention needed. ( for example https://circleci.com/gh/txomon/mosbot/17)
I really would appreciate having pipenv sync --system
as well. This would be the preferred way to use pipenv in a Docker container. At the moment I'm using pipenv install --system --deploy
which is not as great of a solution.
It seems that this issue has stalled. Would it make sense to take
https://github.com/pypa/pipenv/commit/aca8e1238e93aeb42ce20c660f3ec5d7ec4b5479 and make a PR from it?
Is there any difference between pipenv install --ignore-pipfile
and pipenv sync
?
I'm currently using pipenv install --system --ignore-pipfile
when I want to install dependencies from the Pipfile.lock into the system.
Update: Found an explanation in #3150, it seems that using the pipenv install --system --ignore-pipfile --deploy
should be equivalent to pipenv sync
I've managed to get pipenv sync
and pipenv install --system --ignore-pipfile --deploy
to mostly function under tox
, but if I'm running directly through tox then something always fails to install and it never recovers. If I go into the virtualenv then everything installs just fine.
+1
there is a workaround which I'm using in my deployments.
in CI, I will check if Pipfile.lock
and Pipfile
are in sync in a CI pipeline during tests:
pipenv install --deploy
then, during creation of Docker images, I don't include Pipfile
and use pipenv install --ignore-pipfile --deploy --system
.
rm Pipefile
touch Pipefile
pipenv install --ignore-pipfile --deploy --system
It is the fastest method I found.
Most helpful comment
I really would appreciate having
pipenv sync --system
as well. This would be the preferred way to use pipenv in a Docker container. At the moment I'm usingpipenv install --system --deploy
which is not as great of a solution.It seems that this issue has stalled. Would it make sense to take
https://github.com/pypa/pipenv/commit/aca8e1238e93aeb42ce20c660f3ec5d7ec4b5479 and make a PR from it?