-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
How can I sync the packages on pyproject.toml(or poetry.lock) and on virtualenv? #796
Comments
your teammates have to do a poetry update |
@jgirardet I try to |
I'm not sure this would be a good idea -- at least not by default. Perhaps a |
@garyo Thank you so much :) I will try to ecreate the virtualenv. |
@garyo Could you expand on what danger would attach to this?
Is there a way to do that with poetry? For instance, in pipenv there is |
@rpdelaney sure -- anything you install manually in the virtualenv (e.g. with plain |
Thank you for that, it helps. I typically have this problem when switching between git branches where one branch has a dependency that another does not. Checking out another branch does not "check out" another venv, which can lead to my venv having broken dependencies vis the code that's on disk. In pipenv an extra Sometimes I install things in the venv that aren't an explicit project dependency. I don't like installing things with pip outside of a venv so this might include extra linters, another REPL I like, things like that. So I get that concern also. Using symlinks to modules is something I hadn't heard of but it's interesting. I think the point I am still resting on is that "go find the venv and rm -r it yourself" doesn't seem any less smelly or dangerous as a solution. I'm probably going to wind up storing my venvs in the project directory when using poetry, which imho isn't ideal either. I'm not sure what the ideal solution would be, but even a |
In the latest preview there is already such a command: |
I've run into situations in which this would be useful, such as switching between the tensorflow and tensorflow nightly builds which share the same namespace. pip-tools has pip-sync which implements this functionality. |
I think this would be hugely useful. And actually seems like what you would want if you want reproducible builds. I have the situation where a package has been flagged for security issues, was removed, but is still hanging around on build servers. poetry update is not an option as that modifies the lock file ( i.e. no longer reproducible). Currently I am force to remove the virtual env, which results in very long build times. |
Yep, this is addressed by #2172 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Question
For example, I remove a package(e.g Arrow) from
pyproject.toml
bypoetry remove arrow
and I see the package is removed frompyproject.toml
,poetry.lock
and my virtualenv. And then I deploypyproject.toml
andpoetry.lock
.My teammate download these files and try to install by
poetry install
. However arrow package is NOT removed from teammate's virtualenv. I want to sync them (pyproject.toml and virtualenv) likepipenv sync
. How can I solve this problem?The text was updated successfully, but these errors were encountered: