marimo icon indicating copy to clipboard operation
marimo copied to clipboard

pip install error installing example dependencies

Open arbirk opened this issue 1 year ago • 2 comments

Describe the bug

I ran pip install -r requirements.txt in the examples folder and got the following error:

Collecting osqp>=0.6.2 Downloading osqp-0.6.3.tar.gz (228 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 228.4/228.4 KB 16.0 MB/s eta 0:00:00 Installing build dependencies ... error error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [113 lines of output] Collecting oldest-supported-numpy Downloading oldest_supported_numpy-2023.10.25-py3-none-any.whl (4.9 kB) Collecting setuptools>=40.8.0 Downloading setuptools-69.0.2-py3-none-any.whl (819 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 819.5/819.5 KB 5.0 MB/s eta 0:00:00 Collecting wheel Downloading wheel-0.42.0-py3-none-any.whl (65 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.4/65.4 KB 7.1 MB/s eta 0:00:00 Collecting setuptools_scm>=6.2 Downloading setuptools_scm-8.0.4-py3-none-any.whl (42 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.1/42.1 KB 5.8 MB/s eta 0:00:00 Collecting qdldl Downloading qdldl-0.1.7.post0.tar.gz (70 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.0/71.0 KB 10.8 MB/s eta 0:00:00 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 'done' Installing backend dependencies: started Installing backend dependencies: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting numpy==1.21.6 Downloading numpy-1.21.6-cp310-cp310-macosx_11_0_arm64.whl (12.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.4/12.4 MB 38.6 MB/s eta 0:00:00 Collecting packaging>=20 Using cached packaging-23.2-py3-none-any.whl (53 kB) Collecting tomli>=1 Using cached tomli-2.0.1-py3-none-any.whl (12 kB) Collecting typing-extensions Using cached typing_extensions-4.9.0-py3-none-any.whl (32 kB) Collecting scipy>=0.13.2 Downloading scipy-1.11.4-cp310-cp310-macosx_12_0_arm64.whl (29.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 29.8/29.8 MB 48.6 MB/s eta 0:00:00 Building wheels for collected packages: qdldl Building wheel for qdldl (pyproject.toml): started Building wheel for qdldl (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error

    × Building wheel for qdldl (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [65 lines of output]
        running bdist_wheel
        running build
        running build_ext
        Traceback (most recent call last):
          File "<string>", line 81, in build_extensions
          File "/Users/davidarbirk/miniforge3/lib/python3.10/subprocess.py", line 420, in check_output
            return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
          File "/Users/davidarbirk/miniforge3/lib/python3.10/subprocess.py", line 501, in run
            with Popen(*popenargs, **kwargs) as process:
          File "/Users/davidarbirk/miniforge3/lib/python3.10/subprocess.py", line 966, in __init__
            self._execute_child(args, executable, preexec_fn, close_fds,
          File "/Users/davidarbirk/miniforge3/lib/python3.10/subprocess.py", line 1842, in _execute_child
            raise child_exception_type(errno_num, err_msg, err_filename)
        FileNotFoundError: [Errno 2] No such file or directory: 'cmake'
  
        During handling of the above exception, another exception occurred:
  
        Traceback (most recent call last):
          File "/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/tmp_isdzniu_in_process.py", line 363, in <module>
            main()
          File "/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/tmp_isdzniu_in_process.py", line 345, in main
            json_out['return_val'] = hook(**hook_input['kwargs'])
          File "/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/tmp_isdzniu_in_process.py", line 261, in build_wheel
            return _build_backend().build_wheel(wheel_directory, config_settings,
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 404, in build_wheel
            return self._build_with_temp_dir(
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 389, in _build_with_temp_dir
            self.run_setup()
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
            exec(code, locals())
          File "<string>", line 113, in <module>
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
            return distutils.core.setup(**attrs)
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
            return run_commands(dist)
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
            dist.run_commands()
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
            self.run_command(cmd)
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 963, in run_command
            super().run_command(command)
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
            cmd_obj.run()
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/normal/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 368, in run
            self.run_command("build")
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
            self.distribution.run_command(command)
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 963, in run_command
            super().run_command(command)
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
            cmd_obj.run()
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
            self.run_command(cmd_name)
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
            self.distribution.run_command(command)
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 963, in run_command
            super().run_command(command)
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
            cmd_obj.run()
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 88, in run
            _build_ext.run(self)
          File "/private/var/folders/xp/9tpdfsb14h19rmvd1prj9d9h0000gn/T/pip-build-env-xs99b8zu/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
            self.build_extensions()
          File "<string>", line 83, in build_extensions
        RuntimeError: CMake must be installed to build qdldl
        [end of output]
  
    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for qdldl
  Failed to build qdldl
  ERROR: Could not build wheels for qdldl, which is required to install pyproject.toml-based projects
  [end of output]

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

× pip subprocess to install build dependencies 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.

Environment

(base) ➜ examples git:(main) marimo env
{ "marimo": "0.1.64", "OS": "Darwin", "OS Version": "23.1.0", "Python Version": "3.10.4", "Binaries": { "Chrome": "120.0.6099.71", "Node": "v18.7.0" }, "Requirements": { "black": "23.11.0", "click": "8.1.7", "jedi": "0.18.1", "pymdown-extensions": "10.5", "tomlkit": "0.12.3", "tornado": "6.2", "typing_extensions": "4.9.0" } }

Code to reproduce

pip install -r requirements.txt

arbirk avatar Dec 11 '23 19:12 arbirk

Hi @arbirk, thanks for reporting!

It looks like pypi isn't able to find a wheel for qdldl, and your machine doesn't have cmake installed so the build fails. Probably because qdldl doesn't have an arm64 wheel for macOS.

I will follow-up with the qdldl maintainers elsewhere.

akshayka avatar Dec 12 '23 18:12 akshayka

In the meantime, you can workaround this issue using the tip here: https://github.com/osqp/qdldl-python/issues/26

akshayka avatar Dec 12 '23 18:12 akshayka

Closing as there is no action on our end

mscolnick avatar Apr 12 '24 01:04 mscolnick