Operating system, environment, python version
Windows 10 , CMD?, python3.12.2
What you tried
pip install pyportfolioopt
Error message
C:\Users\Tomos Atkinson>pip install pyportfolioopt
Collecting pyportfolioopt
Using cached pyportfolioopt-1.5.5-py3-none-any.whl.metadata (23 kB)
Collecting cvxpy<2.0.0,>=1.1.19 (from pyportfolioopt)
Using cached cvxpy-1.4.2-cp312-cp312-win_amd64.whl
Requirement already satisfied: numpy<2.0.0,>=1.22.4 in c:\users\tomos atkinson\appdata\local\programs\python\python312\lib\site-packages (from pyportfolioopt) (1.26.4)
Requirement already satisfied: pandas>=0.19 in c:\users\tomos atkinson\appdata\local\programs\python\python312\lib\site-packages (from pyportfolioopt) (2.2.0)
Requirement already satisfied: scipy<2.0,>=1.3 in c:\users\tomos atkinson\appdata\local\programs\python\python312\lib\site-packages (from pyportfolioopt) (1.12.0)
Collecting osqp>=0.6.2 (from cvxpy<2.0.0,>=1.1.19->pyportfolioopt)
Using cached osqp-0.6.5-cp312-cp312-win_amd64.whl.metadata (1.8 kB)
Requirement already satisfied: ecos>=2 in c:\users\tomos atkinson\appdata\local\programs\python\python312\lib\site-packages (from cvxpy<2.0.0,>=1.1.19->pyportfolioopt) (2.0.13)
Collecting clarabel>=0.5.0 (from cvxpy<2.0.0,>=1.1.19->pyportfolioopt)
Using cached clarabel-0.7.1-cp37-abi3-win_amd64.whl.metadata (4.7 kB)
Requirement already satisfied: scs>=3.0 in c:\users\tomos atkinson\appdata\local\programs\python\python312\lib\site-packages (from cvxpy<2.0.0,>=1.1.19->pyportfolioopt) (3.2.4.post1)
Collecting pybind11 (from cvxpy<2.0.0,>=1.1.19->pyportfolioopt)
Using cached pybind11-2.11.1-py3-none-any.whl.metadata (9.5 kB)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\users\tomos atkinson\appdata\local\programs\python\python312\lib\site-packages (from pandas>=0.19->pyportfolioopt) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in c:\users\tomos atkinson\appdata\local\programs\python\python312\lib\site-packages (from pandas>=0.19->pyportfolioopt) (2024.1)
Requirement already satisfied: tzdata>=2022.7 in c:\users\tomos atkinson\appdata\local\programs\python\python312\lib\site-packages (from pandas>=0.19->pyportfolioopt) (2024.1)
Collecting scipy<2.0,>=1.3 (from pyportfolioopt)
Using cached scipy-1.11.4-cp312-cp312-win_amd64.whl.metadata (60 kB)
Collecting qdldl (from osqp>=0.6.2->cvxpy<2.0.0,>=1.1.19->pyportfolioopt)
Using cached qdldl-0.1.7.post0.tar.gz (70 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: six>=1.5 in c:\users\tomos atkinson\appdata\local\programs\python\python312\lib\site-packages (from python-dateutil>=2.8.2->pandas>=0.19->pyportfolioopt) (1.16.0)
Using cached pyportfolioopt-1.5.5-py3-none-any.whl (61 kB)
Using cached clarabel-0.7.1-cp37-abi3-win_amd64.whl (321 kB)
Using cached osqp-0.6.5-cp312-cp312-win_amd64.whl (293 kB)
Using cached scipy-1.11.4-cp312-cp312-win_amd64.whl (43.7 MB)
Using cached pybind11-2.11.1-py3-none-any.whl (227 kB)
Building wheels for collected packages: qdldl
Building wheel for qdldl (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for qdldl (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [66 lines of output]
running bdist_wheel
running build
running build_ext
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\Tomos Atkinson\AppData\Local\Programs\Python\Python312\Scripts\cmake.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'cmake'
Traceback (most recent call last):
File "C:\Users\Tomos Atkinson\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\Tomos Atkinson\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tomos Atkinson\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\build_meta.py", line 410, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\build_meta.py", line 395, in _build_with_temp_dir
self.run_setup()
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 113, in <module>
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\normal\Lib\site-packages\wheel\bdist_wheel.py", line 368, in run
self.run_command("build")
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
self.run_command(cmd_name)
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 89, in run
_build_ext.run(self)
File "C:\Users\Tomos Atkinson\AppData\Local\Temp\pip-build-env-c0p1xjlv\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
self.build_extensions()
File "<string>", line 81, in build_extensions
File "C:\Users\Tomos Atkinson\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Tomos Atkinson\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1.
[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
Operating system, environment, python version Windows 10 , CMD?, python3.12.2
What you tried pip install pyportfolioopt
Error message