-
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
Could not find a suitable TLS CA certificate bundle, when installing dependencies #5977
Comments
poetry is not responsible for your CA certificates, and there is no change between 1.1.13 and 1.1.14 that could possibly be relevant |
I know. This is my initial hunch that poetry could not be the cause. But when I export and use requirements.txt it works. I removed the virtualenvs.create config and it works for 1.1.14. but when setting it back to false it starts to spit out this error. I tried building my image with both versions multiple times, and it works when I downgrade to 1.1.13, regardless if virtualenvs.create is true or false. But I am using mac on docker when testing this. Haven't tried it on linux yet. |
The best hint this project can give you is: whatever you think you are seeing that implicates poetry, it is highly unlikely that poetry is actually relevant to your problem. If you can find a way to reproduce this that shows otherwise, please share it. |
I think I saw what is causing the issue. It is related to #1889. When Adding |
sure, you don't need my permission! if you're happy, please close |
Closing issue now, need to wait for 1.2 to fix, but workaround is simple enough. |
This issue still seems to be problem with 1.2.0 but works fine in 1.1.15 |
If you are running into this, please post a detailed reproduction including a pyproject.toml and the exact commands Poetry is being invoked with. This user ran into Poetry uninstalling its own dependencies because it was installed into an environment that was shared with the project being managed (as well as the OS) by using The best defense against this is to not do it at all -- even if it was seemingly stable (like the 1.1 branch), your own changes, or Poetry's changes may break it or cause unexpected runtime behavior at any time. See #6398 for a roundup of discussion on this and plans to clarify the docs on this particular topic. TL; DR if you are running into this without |
Could it be related to |
Just to add based on my observation. This happens every time Poetry version is 1.2.0. |
If you're experiencing this, you're installing Poetry and your project such that Poetry is upgrading its own dependencies. If you install Poetry as recommended/supported, Poetry will not try to upgrade certifi under itself. |
@neersighted What is the recommended way of installing dependencies inside Docker? Running |
The recommended install methods are always the same, regardless of containerization. If you install your project and Poetry into the same environment (system or virtual), Poetry will happily break itself as you are asking it to install/manipulate packages that Poetry itself depends on. You should review the install methods (in particular, the CI recs: https://python-poetry.org/docs/#ci-recommendations) and pick one. All of them will install Poetry into a virtual environment to keep from 'corrupting' it by mixing your project in. Virtual environments are still very useful (and near mandatory, depending) in containers for your project as well. Depending on your base image, you may have Python code mixed in to your Poetry environment than can either cause unexpected behavior or cause Poetry to be unable to install. Isolating the choices of your Python distributor from your application is another important feature of virtual environments, and not one to be discounted (see #6398). |
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. |
-vvv
option).python:3.10
Issue
Encountering an error when building in docker image with
poetry config virtualenvs.create false
Though downgrading to1.1.13
fixes the problem.Looks like similar with #4414 at first glanceEDIT:
This is related to #1889, when using
--no-dev
flag inpoetry install
andvirtualenvs.create false
it uninstalls some unneeded dependencies which causescertifi
to be uninstalled in the system before poetry installs the main dependencies, causing the missing ca cert errors.The easiest workaround is to
poetry add certifi
so that the--no-dev
flag will not uninstall it.The text was updated successfully, but these errors were encountered: