2

If I try to run poetry install I get the error

  • Installing six (1.16.0)

  CalledProcessError

  Command 'C:\Users\XXX\AppData\Local\pypoetry\Cache\virtualenvs\XXX-MaFxIpG_-py3.9\Scripts\python.exe -m pip install --disable-pip-version-check --isolated --no-input --prefix C:\Users\lazlo\AppData\Local\pypoetry\Cache\virtualenvs\XXXX-MaFxIpG_-py3.9 --no-deps C:\Users\lazlo\AppData\Local\pypoetry\Cache\artifacts\fb\06\dd\b5671b47dd0597663bc05d60d324bb315a8cef56f3179b8f9067f88e50\pycparser-2.21-py2.py3-none-any.whl' returned non-zero exit status 1.


The following error occurred when trying to handle this error:


  EnvCommandError

  Command C:\Users\XXX\AppData\Local\pypoetry\Cache\virtualenvs\XXX-MaFxIpG_-py3.9\Scripts\python.exe -m pip install --disable-pip-version-check --isolated --no-input --prefix C:\Users\XXX\AppData\Local\pypoetry\Cache\virtualenvs\XXX-MaFxIpG_-py3.9 --no-deps C:\Users\lazlo\AppData\Local\pypoetry\Cache\artifacts\fb\06\dd\b5671b47dd0597663bc05d60d324bb315a8cef56f3179b8f9067f88e50\pycparser-2.21-py2.py3-none-any.whl errored with the following return code 1, and output:
  ERROR: Can not combine '--user' and '--prefix' as they imply different installation locations

The following error occurred when trying to handle this error:

PoetryException

  Failed to install C:/Users/XXX/AppData/Local/pypoetry/Cache/artifacts/fb/06/dd/b5671b47dd0597663bc05d60d324bb315a8cef56f3179b8f9067f88e50/six-1.16.0-py2.py3-none-any.whl


But when I look at this path, I can find the file.

My pyproject.toml looks like

[tool.poetry]
name = "lf_privat"
version = "1.0.0"
description = ""
authors = [
    "Lazloo <lazloo@xxxx.com>",
]
license = "Proprietary"

[[tool.poetry.source]]
name = "XXXX_nexus"
url = "https://nexus.infrastructure.XXX.net/repository/pypi-all/simple/"


[tool.poetry.dependencies]
python = ">=3.8,<4.0"
pandas = "^1.4.4"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
testpaths = ["tests"]

While the package itself seems not to be the issue. If I try to install other packages I get the same error message.

Can I do something about this?

Lazloo Xp
  • 858
  • 1
  • 11
  • 36
  • 1
    Please either a) provide a minimal reproducible example or b) show your pyproject.toml, poetry.lock, python version and the exact command you ran. – FiddleStix Jun 06 '23 at 09:53
  • The command is already completly written `poetry install`. I try to find a reproducible minimal poetry.toml – Lazloo Xp Jun 06 '23 at 09:58
  • 1
    If I make an empty poetry project with python 3.11, add `pycparser = "^2.21"` to the `[tool.poetry.dependencies]` section of `pyproject.toml` and run `poetry install` then pycparser is installed as you would expect. There is likely either something wrong with your project files, with your poetry environment, your poetry install or your python install. I guess there may also be an issue with the version of pycparser you are trying to install. – FiddleStix Jun 06 '23 at 10:02
  • Do you have custom _pip_ configuration? Maybe in `PIP_*` environment variables or `pip.conf` file? I do not see the `--user` option in the command being run (in the console debug output), so it might be set somewhere else. -- Maybe related: https://github.com/python-poetry/poetry/issues/6521 – sinoroc Jun 06 '23 at 10:31
  • an example toml added. The package seems to be irrelevant as wit the given toml it is not `pycparser ` anymore – Lazloo Xp Jun 06 '23 at 12:45

1 Answers1

0

I did not find the root of the issue but after reinstalling poetry using the steps of the official website poetry installation the issue does not occur anymore

Lazloo Xp
  • 858
  • 1
  • 11
  • 36
  • You probably had an old version of Poetry that still had the issue: https://github.com/python-poetry/poetry/issues/6521 – sinoroc Jun 06 '23 at 19:29