0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Python実践データ分析100本ノック:ノック61でPulpSolverError

Posted at

結論

PuLPをpipで入れ直す

躓いたエラー

ノック61の輸送最適化問題、数理モデル作成にて

PulpSolverError                           Traceback (most recent call last)
<ipython-input-2-28e0cbb39044> in <module>
     25 for j in range(nf):
     26     m1 += lpSum(v1[i,j] for i in range(nw)) >= df_demand.iloc[0][j]
---> 27 m1.solve()
     28 
     29 # 総輸送コスト計算 #

原因

下記のcondaコマンドでpulpをインストールしていた

conda install -c conda-forge pulp

解決方法

pulpの確認

$ conda list
pulp                      2.4              py38h50d1736_0    conda-forge
                                                             ^^^^^^^^^^^

pulpを一旦削除

$ conda remove pulp

pippulpを再度インストール

$ pip3 install pulp

pulpを再確認

$ conda list
pulp                      2.4                      pypi_0    pypi
                                                             ^^^^

参考記事

How to debug most errors during solving

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?