-
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
1.1a3 sometimes removes pkg_resources with --remove-untracked #2673
Comments
After the above happens, the virtualenv is broken and must be deleted. |
Possibly happens only in Ubuntu? https://stackoverflow.com/questions/39577984/what-is-pkg-resources-0-0-0-in-output-of-pip-freeze-command |
Reproduces for me every time on WSL Ubuntu 20.04 with the attached pyproject file:
Removing the python3-virtualenv package as suggested on SO does not help because it is not installed. |
@PetterS I'll try it in a VM later see if I can help narrow down the issue. In the meantime, would it be possible to install from the |
Is there an easy way of installing the
|
So just creating a virtualenv does not list |
Latest
But note that it now does |
It could still give a quite unpleasant upgrade experience from 1.0.x to 1.1.0, since the virtualenv may have to be deleted and rebuilt from scratch (once). |
If you have used pip to install pip install --user git+https://github.com/python-poetry/poetry.git@develop
We might need to add wheel to the
Considering that this issue is isolated to very specific environments (as best as we can tell), the effort to workaround an issue like this might be significantly higher than the benefits. And especially since we still do not know what the root cause was here. I think having to rebuilt a |
I think it should affect all (or at the very least all in 20.04) environment created with <1.1. If using poetry in production (like we do), this has to be taken into account when migrating from 1.0.x to 1.1. The fact that virtualenvs may need to be recreated should be clearly mentioned in the release notes for 1.1. |
I should have been clearer. The upgrade to
I would not recommend using poetry for managing your production environments. While it is certainly a pattern projects have been using in the wild - |
But if I create an environment with 1.0.x it will use the old method of creating the virtualenv. Then, after upgrading to 1.1.0 and running |
I Have just experienced it myself and after quite a lot of digging and confusion had to rebuild the environment (due to |
@PetterS You might run into it on very specific scenarios where this could be an issue. And even then, it is seems like an issue of the environment and not necessarily how poetry manages it. I am still not sure how
@snejus that should be resolved with the next pre-relese. |
Since we are apparently not the only ones running into this issue, I think a notice or warning that the virtualenv may need to be recreated is in order. For me personally, it is not a big issue or course, since I am aware of this issue and the work-around. |
Still would be nice if Poetry recreated the virtualenv automatically, or had some protection against
|
@abn is there a way to detect if a virtualenv was created with Poetry 1.0.x so we, after upgrading to 1.1, can delete it automatically and recreate it? |
@PetterS unfortunately no, since poetry does not have a notion of this all it cares about is pip and python. Regarding this issue. Can you try reproducing this with a migration form |
I tried this in a Windows Sandbox (therefore having a clean install). Could not reproduce it there, which is good! |
Let's close this since it no longer reproduces! 👍 |
Happened to me when upgrading a machine from 1.0.10 to 1.1.4 today. The virtualenv itself was created with an older Poetry version, to this does not contradict the comment from Sep 26. |
Hitting the same issue with Poetry version 1.1.7 installed via pip and a venv created via Forcing the reinstallation of setuptools while inside the venv works around it : but the remove untracked breaks the venv again Ubuntu 20.04 docker on WSL2 |
I'm running into the same issue with poetry 1.1.11 on Debian 11 using Python 3.9. I'm currently working around this by manually adding
Environment info:
System Python packages:
I did try this with Poetry 1.2.0a2 and saw no problem, but I'm unable to use that version due to some unrelated issues (and it being pre-release). |
Long stale and resolved -- please comment or open a new issue if you think this still occurs. |
On Ubuntu 20.04.3 LTS with Python 3.8 and Poetry 1.2.1, using |
@ClaudiaSchulz can you please open a new issue with a reproduction that occurs in a container? |
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. |
Filing an issue about this as well (there is also a PR; #2624)
Reproduces quite easily for me:
pyproject.toml:
The text was updated successfully, but these errors were encountered: