1
crackidz 4 天前
有没有考虑过是 Python 版本问题...
|
![]() |
2
rooftop64 4 天前
CentOS 版本、Python 版本?
poetry install 报错信息? |
![]() |
4
kylezb 4 天前
不是很懂,但是 34 行的 get-poetry.py 链接是 404 ,portry master 仓库里也没这个文件。
|
5
xscanqianmeng666 4 天前
为啥不用 docker
|
6
abbyyhk OP @rooftop64 Ansible playbook:
- name: check that poetry command exists stat: path=/root/.poetry/bin/poetry register: _poetry_executable - name: download the poetry installer get_url: url: https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py dest: /tmp/get-poetry.py when: _poetry_executable.stat.exists == false - name: run the poetry installer command: /usr/bin/python3 /tmp/get-poetry.py -y when: _poetry_executable.stat.exists == false - name: install specific poetry version command: /root/.poetry/bin/poetry self update 1.1.8 environment: VIRTUAL_ENV: /opt/virtualenvs/{{ project_name }} tags: - git_update - name: install project python dependencies using poetry environment: VIRTUAL_ENV: /opt/virtualenvs/{{ project_name }} command: /root/.poetry/bin/poetry install args: chdir: /opt/{{ project_name }} tags: - git_update Error msg: TASK [celus : install project python dependencies using poetry] ******************************************************************************************************* fatal: [47.243.249.94]: FAILED! => { "changed": true, "cmd": ["/root/.poetry/bin/poetry", "install"], "delta": "0:00:00.770595", "end": "2025-03-13 09:09:32.128918", "msg": "non-zero return code", "rc": 1, "start": "2025-03-13 09:09:31.358323", "stderr": " RuntimeError The Poetry configuration is invalid: - Additional properties are not allowed ('package-mode' was unexpected) at ~/.poetry/venv/lib64/python3.6/site-packages/poetry/core/factory.py:45 in create_poetry 41│ message = \"\" 42│ for error in check_result[\"errors\"]: 43│ message += \" - {}\\n\".format(error) 44│ → 45│ raise RuntimeError(\"The Poetry configuration is invalid:\\n\" + message) 46│ 47│ # Load package 48│ name = local_config[\"name\"] 49│ version = local_config[\"version\"] ", "stderr_lines": [ "", " RuntimeError", "", " The Poetry configuration is invalid:", " - Additional properties are not allowed ('package-mode' was unexpected)", " ", "", " at ~/.poetry/venv/lib64/python3.6/site-packages/poetry/core/factory.py:45 in create_poetry", " 41│ message = \"\"", " 42│ for error in check_result[\"errors\"]:", " 43│ message += \" - {}\\n\".format(error)", " 44│ ", " → 45│ raise RuntimeError(\"The Poetry configuration is invalid:\\n\" + message)", " 46│ ", " 47│ # Load package", " 48│ name = local_config[\"name\"]", " 49│ version = local_config[\"version\"]" ], "stdout": "", "stdout_lines": [] } Poetry pyproject.toml https://github.com/techlib/celus/blob/master/pyproject.toml |
![]() |
7
vicalloy 4 天前
celus 这个项目要求的 python 版本是 3.8 ,你的 python 版本太老了。
|
8
abbyyhk OP @kylezb 对,旧 Poetry 仓库失效了,这个地方需要改,但我不知道怎么改成新版的安装方式
旧仓库: https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py 新:curl -sSL https://install.python-poetry.org | python3 - ref: https://python-poetry.org/docs/#installing-with-the-official-installer |
![]() |
10
clhlc 4 天前
|
![]() |
11
rooftop64 4 天前
安装的 poetry 版本多少?
celus 版本没要求的话,可以用 https://github.com/techlib/celus/archive/refs/tags/v1.0.39.tar.gz 试下 |
![]() |
12
tomczhen 4 天前
poetry1.x 版本应该是兼容的,可以试试装 1.8.5 这个版本试试。Python 版本没匹配上,可以试试下载 Python standalone 里面的静态编译包作为解释器省的再弄编译安装。
|
![]() |
14
robinlovemaggie 4 天前
|
![]() |
15
enrolls 4 天前
为什么用 Poetry 做环境管理呢?你要做环境管理,环境隔离,有很多替代方案,而不应该卡在“Poetry 安装报错”上。哪怕原生的 venv 都有方案,我自己在用,还没放工具出来。
|
16
Martin123123 4 天前
绿泡泡已联系
|
![]() |
17
defunct9 19 小时 20 分钟前
已解决。问题是很荒谬的。用 poetry 是根本不行的。
|