question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

poetry install does not work for cvxpy dependency when updating poetry version from 1.1.15 to 1.2.1 on a mac m1

See original GitHub issue
  • Poetry version: 1.2.1
  • Python version: pyenv local 3.10.0
  • OS version and name: Mac OS 12.6 (Apple M1 Pro)
  • pyproject.toml: gist
  • 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

I have encountered an issue that I could not resolve. I created a poetry-demo folder following : https://python-poetry.org/docs/basic-usage/ and updated the pyproject.toml file as in the gist link. Then when running poetry install the command fails (see below for the error message).

When I do the exact same process with the poetry version 1.1.15 installed it works fine. Or when I do the same with the same poetry version (1.2.1) on ubuntu it works as well.

The workflow to produce my error.

  • go in home folder
  • run pyenv local 3.10.0
  • run poetry new poetry-demo
  • update the pyproject.toml as in the gist link
  • in the poetry-demo folder run poetry install

Here is the error message I got:

`poetry install -vvv Loading configuration file /Users/axeldelaharpe/Library/Preferences/pypoetry/config.toml Using virtualenv: /Users/axeldelaharpe/Library/Caches/pypoetry/virtualenvs/poetry-demo-RrhhU6tg-py3.10 Project environment contains an empty path in sys_path, ignoring. Installing dependencies from lock file

Finding the necessary packages for the current system

Package operations: 0 installs, 5 updates, 0 removals, 2 skipped

• Updating qdldl (0.1.5.post2 /Users/axeldelaharpe/Library/Caches/pypoetry/artifacts/4f/3e/45/a608f7643f52658bb7cee0e0fce6b7b5cc1728ce62512187c20f77f6eb/qdldl-0.1.5.post2.tar.gz -> 0.1.5.post2): Pending… [keyring.backend] Loading KWallet [keyring.backend] Loading SecretService [keyring.backend] Loading Windows [keyring.backend] Loading chainer [keyring.backend] Loading libsecret [keyring.backend] Loading macOS Creating new session for pypi.org [urllib3.connectionpool] Starting new HTTPS connection (1): pypi.org:443 [urllib3.connectionpool] https://pypi.org:443 “GET /pypi/qdldl/0.1.5.post2/json HTTP/1.1” 304 0 Skipping wheel qdldl-0.1.5.post2-cp310-cp310-macosx_10_9_x86_64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp310-cp310-win_amd64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp36-cp36m-macosx_10_9_x86_64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp36-cp36m-win_amd64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp37-cp37m-macosx_10_9_x86_64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp37-cp37m-win_amd64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp38-cp38-macosx_10_9_x86_64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp38-cp38-win_amd64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp39-cp39-macosx_10_9_x86_64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment Skipping wheel qdldl-0.1.5.post2-cp39-cp39-win_amd64.whl as this is not supported by the current environment • Updating qdldl (0.1.5.post2 /Users/axeldelaharpe/Library/Caches/pypoetry/artifacts/4f/3e/45/a608f7643f52658bb7cee0e0fce6b7b5cc1728ce62512187c20f77f6eb/qdldl-0.1.5.post2.tar.gz -> 0.1.5.post2): Installing… • Updating qdldl (0.1.5.post2 /Users/axeldelaharpe/Library/Caches/pypoetry/artifacts/4f/3e/45/a608f7643f52658bb7cee0e0fce6b7b5cc1728ce62512187c20f77f6eb/qdldl-0.1.5.post2.tar.gz -> 0.1.5.post2): Failed

Stack trace:

2 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1472 in _run 1470│ ) 1471│ else: → 1472│ output = subprocess.check_output( 1473│ command, stderr=subprocess.STDOUT, env=env, **kwargs 1474│ )

1 ~/.pyenv/versions/3.10.0/lib/python3.10/subprocess.py:420 in check_output 418│ kwargs[‘input’] = empty 419│ → 420│ return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, 421│ **kwargs).stdout 422│

CalledProcessError

Command ‘[’/Users/axeldelaharpe/Library/Caches/pypoetry/virtualenvs/poetry-demo-RrhhU6tg-py3.10/bin/python’, ‘-m’, ‘pip’, ‘install’, ‘–use-pep517’, ‘–disable-pip-version-check’, ‘–prefix’, ‘/Users/axeldelaharpe/Library/Caches/pypoetry/virtualenvs/poetry-demo-RrhhU6tg-py3.10’, ‘–upgrade’, ‘–no-deps’, ‘/Users/axeldelaharpe/Library/Caches/pypoetry/artifacts/4f/3e/45/a608f7643f52658bb7cee0e0fce6b7b5cc1728ce62512187c20f77f6eb/qdldl-0.1.5.post2.tar.gz’]’ returned non-zero exit status 1.

at ~/.pyenv/versions/3.10.0/lib/python3.10/subprocess.py:524 in run 520│ # We don’t call process.wait() as .exit does that for us. 521│ raise 522│ retcode = process.poll() 523│ if check and retcode: → 524│ raise CalledProcessError(retcode, process.args, 525│ output=stdout, stderr=stderr) 526│ return CompletedProcess(process.args, retcode, stdout, stderr) 527│ 528│

The following error occurred when trying to handle this error:

Stack trace:

3 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:49 in pip_install 47│ 48│ try: → 49│ return environment.run_pip(*args) 50│ except EnvCommandError as e: 51│ raise PoetryException(f"Failed to install {path.as_posix()}") from e

2 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1435 in run_pip 1433│ pip = self.get_pip_command() 1434│ cmd = pip + list(args) → 1435│ return self._run(cmd, **kwargs) 1436│ 1437│ def run_python_script(self, content: str, **kwargs: Any) -> int | str:

1 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1712 in _run 1710│ def _run(self, cmd: list[str], **kwargs: Any) -> int | str: 1711│ kwargs[“env”] = self.get_temp_environ(environ=kwargs.get(“env”)) → 1712│ return super()._run(cmd, **kwargs) 1713│ 1714│ def get_temp_environ(

EnvCommandError

Command [‘/Users/axeldelaharpe/Library/Caches/pypoetry/virtualenvs/poetry-demo-RrhhU6tg-py3.10/bin/python’, ‘-m’, ‘pip’, ‘install’, ‘–use-pep517’, ‘–disable-pip-version-check’, ‘–prefix’, ‘/Users/axeldelaharpe/Library/Caches/pypoetry/virtualenvs/poetry-demo-RrhhU6tg-py3.10’, ‘–upgrade’, ‘–no-deps’, ‘/Users/axeldelaharpe/Library/Caches/pypoetry/artifacts/4f/3e/45/a608f7643f52658bb7cee0e0fce6b7b5cc1728ce62512187c20f77f6eb/qdldl-0.1.5.post2.tar.gz’] errored with the following return code 1, and output: Processing /Users/axeldelaharpe/Library/Caches/pypoetry/artifacts/4f/3e/45/a608f7643f52658bb7cee0e0fce6b7b5cc1728ce62512187c20f77f6eb/qdldl-0.1.5.post2.tar.gz Installing build dependencies: started Installing build dependencies: finished with status ‘done’ Getting requirements to build wheel: started Getting requirements to build wheel: finished with status ‘error’ error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
    /Users/axeldelaharpe/Library/Caches/pypoetry/virtualenvs/poetry-demo-RrhhU6tg-py3.10/bin/python: No module named pip
    Traceback (most recent call last):
      File "<string>", line 24, in __init__
    ModuleNotFoundError: No module named 'pybind11'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Users/axeldelaharpe/Library/Caches/pypoetry/virtualenvs/poetry-demo-RrhhU6tg-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
        main()
      File "/Users/axeldelaharpe/Library/Caches/pypoetry/virtualenvs/poetry-demo-RrhhU6tg-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/Users/axeldelaharpe/Library/Caches/pypoetry/virtualenvs/poetry-demo-RrhhU6tg-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
        return hook(config_settings)
      File "/private/var/folders/h_/mnx8ymsx41jd3t7w_xq27_nh0000gn/T/pip-build-env-8dzijn3z/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
        return self._get_build_requires(config_settings, requirements=['wheel'])
      File "/private/var/folders/h_/mnx8ymsx41jd3t7w_xq27_nh0000gn/T/pip-build-env-8dzijn3z/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
        self.run_setup()
      File "/private/var/folders/h_/mnx8ymsx41jd3t7w_xq27_nh0000gn/T/pip-build-env-8dzijn3z/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 482, in run_setup
        super(_BuildMetaLegacyBackend,
      File "/private/var/folders/h_/mnx8ymsx41jd3t7w_xq27_nh0000gn/T/pip-build-env-8dzijn3z/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
        exec(code, locals())
      File "<string>", line 98, in <module>
      File "<string>", line 28, in __init__
    RuntimeError: pybind11 install failed.
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

at ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1476 in run 1472│ output = subprocess.check_output( 1473│ command, stderr=subprocess.STDOUT, env=env, **kwargs 1474│ ) 1475│ except CalledProcessError as e: → 1476│ raise EnvCommandError(e, input=input) 1477│ 1478│ return decode(output) 1479│ 1480│ def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:

Stack trace:

6 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:253 in _execute_operation 251│ 252│ try: → 253│ result = self._do_execute_operation(operation) 254│ except EnvCommandError as e: 255│ if e.e.returncode == -2:

5 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:326 in _do_execute_operation 324│ return 0 325│ → 326│ result: int = getattr(self, f"execute{method}")(operation) 327│ 328│ if result != 0:

4 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:453 in _execute_update 451│ 452│ def _execute_update(self, operation: Install | Update) -> int: → 453│ status_code = self._update(operation) 454│ 455│ self._save_url_reference(operation)

3 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:491 in _update 489│ 490│ def _update(self, operation: Install | Update) -> int: → 491│ return self._install(operation) 492│ 493│ def _remove(self, operation: Uninstall) -> int:

2 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:488 in _install 486│ ) 487│ self._write(operation, message) → 488│ return self.pip_install(archive, upgrade=operation.job_type == “update”) 489│ 490│ def _update(self, operation: Install | Update) -> int:

1 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:123 in pip_install 121│ ) -> int: 122│ try: → 123│ pip_install(req, self._env, upgrade=upgrade, editable=editable) 124│ except EnvCommandError as e: 125│ output = decode(e.e.output)

PoetryException

Failed to install /Users/axeldelaharpe/Library/Caches/pypoetry/artifacts/4f/3e/45/a608f7643f52658bb7cee0e0fce6b7b5cc1728ce62512187c20f77f6eb/qdldl-0.1.5.post2.tar.gz

at ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:51 in pip_install 47│ 48│ try: 49│ return environment.run_pip(*args) 50│ except EnvCommandError as e: → 51│ raise PoetryException(f"Failed to install {path.as_posix()}") from e 52│

`

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dimblebycommented, Oct 6, 2022

yes

0reactions
neersightedcommented, Oct 29, 2022

Indeed, Poetry cannot walk away from use of --use-pep517 without regressing in important functionality that was recently introduced (the ability to depend on and manage setuptools and pip like any other package); it is also part of our incremental work towards a new installer that completely removes Poetry’s usage of pip.

In essence, if you are not PEP 517 compatible, you are not compatible with any documented build system or behavior; you are only fully installable with pip. Poetry is not pip and we have to make different design choices. Becoming PEP 517 compatible is trivial for over 90% of cases – and if upstream is unresponsive, I would suggest forking and fixing it, or building wheels with pip and installing them with Poetry.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Library installation error using 1.2.0 · Issue #6407 - GitHub
poetry install does not work for cvxpy dependency when updating poetry version from 1.1.15 to 1.2.1 on a mac m1 #6712.
Read more >
Install — CVXPY 1.2 documentation
Apple M1 users have had trouble installing CVXPY using the commands above. That trouble stemmed partly from a configuration error in CVXPY's pyproject.toml...
Read more >
python - Receiving EnvCommandError when run poetry install ...
I'm facing the issue when running poetry install command in my new Macbook Pro using Apple M1 chip ...
Read more >
facebook Code Example - Code Grepper
Facebook is a coin which has dual side of content. ... ERROR: Could not find a version that satisfies the requirement cv2 (from...
Read more >
poetry - bytemeta
poetry install does not work for cvxpy dependency when updating poetry version from 1.1.15 to 1.2.1 on a mac m1. seansfkelley. seansfkelley OPEN....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found