[PYTHON] Install cvxpy on windows, Anaconda

What is cvxpy

It's like a wrapper for other mathematical optimization libraries such as cvxopt.

The feature of this library is that it automatically converts optimization problems to the standard system. This makes it very easy to calculate the coefficient matrix.

Installation and its problems

As on the official page

python


conda install -c omnia cvxopt
conda install -c omnia scs
pip install cvxpy

You can install it with, but you will get an error at runtime. CVXcanon and fastcache, which are the libraries that cvxpy depends on, contain a compiled file (.pyd) and an error occurs when reading this. I don't know the cause, but I expect it to be the difference between 32bit and 64bit.

Solution

Delete CVXcanon and fastcache and reinsert them with conda. If you are installing a new one, it is better to install it here first so that you do not have to bother with it twice.

python


pip uninstall cvxcanon
pip uninstall fastcache

conda install -c cvxgrp cvxcanon
conda install fastcache

The cvxcanon repository may be omnia instead of cvxgrp. (Although it is not directly related to this, on Linux, CVXCanon could not be imported when installing from cvxgrp, and it was solved by reinstalling from omnia.)

Finally

You could use the Unofficial Windows Binaries for Python Extension Packages, but it's easier to just type a command. I think.

Recommended Posts

Install cvxpy on windows, Anaconda
Install Anaconda on Windows 10
Install PyStan on Windows without Anaconda
Anaconda on Windows Terminal
Install python on windows
Install pycuda on Windows10
Install pygraphviz on Windows 10
Install Chainer 1.5.0 on Windows
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
[Python] How to install OpenCV on Anaconda [Windows]
How to install / verify graphviz on anaconda / windows10
Install Numpy on virtualenv on Windows
Install watchdog on Windows + Python 3.3
Install Win-Kex (kali-linux) on Windows 10.
Install module on Anaconda (Mac)
Install Chainer 1.6 (GPU) on Windows 7.
Notes on installing Anaconda 3 on Windows
[Python] [Chainer] [Windows] Install Chainer on Windows
Install anaconda on Mac → Add Library
Pip install --ugrade pip fails on Windows
Anaconda python environment construction on Windows 10
Install python2.7 on windows 32bit environment
Install xgboost (python version) on Windows
Install Python on Windows + pip + virtualenv
Build and install OpenCV on Windows
Install Pytorch on Blender 2.90 python on Windows
Install Python 3.7 Anaconda on MAC, but Python 2
How to install pycrypto on Windows
Use Tensorflow 2.1.0 with Anaconda on Windows 10!
Install Python development environment on Windows 10
How to install music 21 on windows
Install easy_install and pip on windows
Install opencv on Mac using Anaconda Navigator
Python on Windows
[Kivy] How to install Kivy on Windows [Python]
Install wsl2 and master linux on windows
# Solution when pip install gives an error when using Anaconda on Windows 10
Install easy_install (Windows)
Theano on Anaconda
How to install richzhang / colorization on Windows 10
Run py.test on Windows Anaconda and MinGW
Install anaconda on a new Mac anyway
Personal Note Package to install on Anaconda
Install and run Python3.5 + NumPy + SciPy on Windows 10
Install Python3, numpy, pandas, matplotlib, etc. on Windows
How to quickly install h5py on Windows 10 [Unofficial]
Eliminates SSL error when PIP Install on Windows.
Install ZIP version Python and pip on Windows 10
Install mecab on Marvericks
Install Tensorflow on Mac
Install TensorFlow on Ubuntu
Install python on WSL
Install Faiss on CentOS 7
Install pyenv on mac
Install Python on Pidora.
Install mongodb on termux
Install Scrapy on python3
Pylint on Windows Atom
Install docker on Fedora31
Linux (WSL) on Windows
Install numba on CentOS 7.2