Skip to content
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

Fail installation on centos8 with specific python version #8884

Closed
3 of 4 tasks
yabb85 opened this issue Jan 16, 2024 · 8 comments
Closed
3 of 4 tasks

Fail installation on centos8 with specific python version #8884

yabb85 opened this issue Jan 16, 2024 · 8 comments
Labels
kind/bug Something isn't working as expected

Comments

@yabb85
Copy link

yabb85 commented Jan 16, 2024

  • Poetry version: 1.7.1
  • Python version: 3.11.5
  • OS version and name: Centos8 stream
  • pyproject.toml:
[tool.poetry]
name = "test"
version = "0.1.0"
description = "test packaging"
authors = ["Your Name <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

We use CentOS 8 Stream to develop with python.
Like the default version of python (3.6) is not compatible with poetry, we install a new python version (3.11) and install poetry with the following command

curl -sSL https://install.python-poetry.org | python3.11 -

after install, it is possible to use poetry init but all command used to manage dependencies and environments fails:

> poetry add tasklib
Creating virtualenv test-fuH6okzm-py3.11 in /home/laurent/.cache/pypoetry/virtualenvs

failed to query /usr/bin/python3 with code 1 err: '  File "/home/laurent/.local/share/pypoetry/venv/lib64/python3.11/site-packages/virtualenv/discovery/py_info.py", line 7\n    from __future__ import annotations\n    ^\nSyntaxError: fut
ure feature annotations is not defined\n'

Same result with poetry install...
The python used is /usr/bin/python3 instead of /usr/bin/python3.11 or /home/space/.local/share/pypoetry/venv/bin/python

Expected

Correct creation of virtualenv or package managing.

@yabb85 yabb85 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jan 16, 2024
@dimbleby
Copy link
Contributor

poetry and 3.6 don't play nice together (previously: #8185). You'll need to create the virtualenv some other way.

@yabb85
Copy link
Author

yabb85 commented Jan 16, 2024

To avoid issue with 3.6 I use the command with call to python3.11

curl -sSL https://install.python-poetry.org | python3.11 -

If poetry is installed in virtualenv, the commands add and install freeze

❯ poetry install -vvvv
Loading configuration file /home/laurent/.config/pypoetry/config.toml
Warning: Found deprecated priority 'secondary' for source 'artifactory' in pyproject.toml. Consider changing the priority to one of the non-deprecated values: 'default', 'primary', 'supplemental', 'explicit'.
Adding repository artifactory (https://***) and setting it as secondary
Adding repository PyPI (https://pypi.org/simple/) and setting it as primary
Using virtualenv: /home/laurent/.cache/pypoetry/virtualenvs/project-prio-xri3QFtW-py3.11
Updating dependencies
Resolving dependencies...
   1: fact: project-prio is 0.1.0
   1: derived: project-prio
   1: fact: project-prio depends on tasklib (^2.5.1)
   1: fact: project-prio depends on rich (^13.6.0)
   1: fact: project-prio depends on pendulum (^2.1.2)
   1: selecting project-prio (0.1.0)
   1: derived: pendulum (>=2.1.2,<3.0.0)
   1: derived: rich (>=13.6.0,<14.0.0)
   1: derived: tasklib (>=2.5.1,<3.0.0)
[keyring.backend] Loading KWallet
[keyring.backend] Loading SecretService
[keyring.backend] Loading Windows
[keyring.backend] Loading chainer
[keyring.backend] Loading libsecret
[keyring.backend] Loading macOS
^C   1: Version solving took 63463.429 seconds.
   1: Tried 1 solutions.

This issue is reproducible on other system with centos8 and python 3.11 installed

@dimbleby
Copy link
Contributor

that doesn't seem to be anything much to do with where this issue started. But if you have a reproducible problem then please provide a way to reproduce it. eg a dockerfile is often a good way,

@dimbleby
Copy link
Contributor

actually that's probably duplicate #8623

so please close this: the first part is duplicate #8185, the second is duplicate #8623

@yabb85
Copy link
Author

yabb85 commented Jan 16, 2024

Must I reopen a new ticket for issue seen when poetry is installed in virtualenv or I must continue on this ticket?
for me two possibilities:

  • possibility to install poetry with specified version like the command displayed in ticket curl -sSL https://install.python-poetry.org | /usr/bin/python3.11 - and continue this ticket
  • fix install/add poetry command when poetry is installed in virtualenv.

Thanks

@yabb85
Copy link
Author

yabb85 commented Jan 16, 2024

Thanks the workaround in ticket #8623 fix the issue.

@dimbleby
Copy link
Contributor

therefore please close this

@yabb85 yabb85 closed this as completed Jan 16, 2024
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
@abn abn removed the status/triage This issue needs to be triaged label Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants