[PYTHON] PyPortfolioOpt (Investment Portfolio Optimization Library) installation error resolution

A memo when installing the Python library PyPortfolioOpt (Investment Portfolio Optimization) to eliminate the error.

With PyPortfolioOpt, you can calculate the investment ratio of each asset (domestic stocks, domestic bonds, foreign stocks, foreign bonds, etc.) with Tsumita NISA, iDeCo, etc. using mathematical optimization.

I tried the best portfolio of WealthNavi in ​​Python

environment

Error message

Error when trying to install the library with pip.

$ pip install PyPorttfolioOpt

Error message.

ERROR: Failed building wheel for scs
Running setup.py clean for scs
Failed to build cvxpy ecos scs
ERROR: Could not build wheels for cvxpy which use PEP 517 and cannot be installed directly

Solution

Install cvxpy (Mathematical Optimization Library). I got an error when I tried to install with pip, so I checked and installed with conda.

conda install -c conda-forge cvxpy

Recommended Posts

PyPortfolioOpt (Investment Portfolio Optimization Library) installation error resolution
Jupyter installation error
centOS 7 installation error