-
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
Poetry from install-poetry.py
does not install packages to system Python even with POETRY_VIRTUALENVS_CREATE=0
#3870
Comments
Thanks for testing the new bootstrap method and for reporting this issue! I think I know where the issue is coming from (Poetry's own virtual environment is mistakenly seen as the system environment). I'll try to come up with a fix and let you know. |
I have the some problem when i use poetry install packages in docker. This is my temporary solution.
|
I have a possibly related issue. I am working inside a venv that I created by hand not using poetry (with --system-site-package), and poetry while seeing the deps already existing, download and install it again, see below:
So here poetry does an extra install while pip does not and poetry is not supposed to manage env, so why not keeping the version that already exists? |
That seems like a separate issue, but I'm not sure. |
a 🖐️ from me too. cannot use install-poetry.sh on relatively clean ubuntu 20.04, but get-poetry.sh works perfectly. |
Until python-poetry/poetry#3870 is resolved. Original commit: 8c59f3e
Until python-poetry/poetry#3870 is resolved. Original commit: 8c59f3e2739c5e92c8279b9dfb7775fcf75c23d1 Original-Commit: TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd@c578af1
I found that I was able to remove this issue on Ubuntu 20.04 by specifying a particular release of
|
python-poetry/poetry#3706 python-poetry/poetry#3870 python-poetry/poetry#4056 Poetry has a new install script, added in python-poetry/poetry#3706. The old get-poetry.py install script is not compatible with Python 3.10, so the new install-poetry.py script will be used. Docker builds and GitHub Actions workflows will be updated to use `POETRY_HOME=/opt/poetry` consistently. As of Poetry 1.1.7, there may be complications in Docker when using install-poetry.py without venvs (`POETRY_VIRTUALENVS_CREATE=false`). While installing dependencies, the following error is frequently seen: ```text OSError Could not find a suitable TLS CA certificate bundle, invalid path: /opt/poetry/venv/lib/python3.9/site-packages/certifi/cacert.pem at /opt/poetry/venv/lib/python3.9/site-packages/requests/adapters.py:227 in cert_verify ``` Poetry may be incorrectly attempting to read from its virtualenv if it's not respecting `POETRY_VIRTUALENVS_CREATE` (python-poetry/poetry#3870). Downstream steps also do not respect `POETRY_VIRTUALENVS_CREATE`, so the application does not run.
python-poetry/poetry#3706 python-poetry/poetry#3870 python-poetry/poetry#4056 Poetry has a new install script, added in python-poetry/poetry#3706. The old get-poetry.py install script is not compatible with Python 3.10. This commit will update the GitHub Actions workflow to use the new install-poetry.py script, with `POETRY_HOME=/opt/poetry` for consistent installs independent of user account, and will also update the workflow to use a virtualenv and run commands with `poetry run` to avoid issues with `POETRY_VIRTUALENVS_CREATE=false`. As of Poetry 1.1.7, there may be complications with install-poetry.py run without venvs (`POETRY_VIRTUALENVS_CREATE=false`). An error is seen: ```text OSError Could not find a suitable TLS CA certificate bundle, invalid path: /opt/poetry/venv/lib/python3.9/site-packages/certifi/cacert.pem at /opt/poetry/venv/lib/python3.9/site-packages/requests/adapters.py:227 in cert_verify ``` Poetry may be incorrectly attempting to read from its virtualenv if it's not respecting `POETRY_VIRTUALENVS_CREATE` (python-poetry/poetry#3870). Downstream steps also do not respect `POETRY_VIRTUALENVS_CREATE`, so the application does not run. To avoid these issues, `poetry run` can be prepended to commands to prompt Poetry to use its virtualenv. Additionally, Poetry errors out with a `JSONDecodeError` when attempting to install packages with Python 3.10 (python-poetry/poetry#4210). Python 3.10 support will be postponed until Poetry is compatible.
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. |
Poetry installed from the latest
install-poetry.py
does not install packages to system Python even withPOETRY_VIRTUALENVS_CREATE=0
.Steps to reproduce:
Spin up a fresh container for demoing:
In the container:
Install a package (note the "Skipping virtualenv creation" message):
Then try to run
We can see that
django
got installed to here:When
pip
would install it here:The same thing also happens with non-root users. This issue does NOT happen with Poetry installed from the latest
get-poetry.py
NOR withpoetry==1.1.5
installed frompip
.The text was updated successfully, but these errors were encountered: