0
1

More than 3 years have passed since last update.

PyPortfolioOpt(投資ポートフォリオ最適化ライブラリ)インストールエラー解消

Posted at

PythonライブラリのPyPortfolioOpt(投資ポートフォリオ最適化)をインストールエラーを解消したときのメモ。

PyPortfolioOptを使うと、つみたてNISAやiDeCoなどで各資産(国内株式・国内債券・外国株式・外国債券など)への投資割合を、数理最適化を用いて算出できます。

PythonでWealthNaviの最適ポートフォリオをやってみた

環境

  • macOS
  • Docker
  • Anaconda3

エラーメッセージ

pipでライブラリをインストールしようとしたらエラー。

$ pip install PyPorttfolioOpt

エラーメッセージ。

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

解決

cvxpy(数理最適化ライブラリ)をインストール。pipでインストールしようとしたらエラーだったので、調べた結果、condaでインストール。

conda install -c conda-forge cvxpy
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1