Ultimately I am trying to install CVXPY for Python 2.7. CVXPY has a few requirements including CVXOPT. I have tried two approaches, installing from Gohlke's website, where he hosts Windows Binaries for Python Extensions: http://www.lfd.uci.edu/~gohlke/pythonlibs/ and building from source myself.
When using the binaries provided from Gohlke, I get the following error when trying to import in python:
import cvxpy Traceback (most recent call last): File "<stdin>", line 1, in <module> ... File "C:\Python27\Lib\site-packages\cvxpy\interface\cvxopt_interface\dense_matrix_interface.py", line 26, in <module> import cvxopt File "C:\Python27\Lib\site-packages\cvxopt\__init__.py", line 32, in <module> import cvxopt.base ImportError: DLL load failed: The specified module could not be found.
I have checked that the
base.pyd file is present in
When building from source I followed the instructions from the site and when eventually building CVXOPT with
python setup.py build --compiler=mingw32 I got the following error:
C:\MinGW\bin\gcc.exe -mdll -O -Wall -Isrc/C/SuiteSparse/AMD/Include -Isrc/C/SuiteSparse/SuiteSparse_config -IC:\Python27\include -IC:\Python27\PC -c src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c -o build\temp.win32-2.7\Release\src\c\suitesparse\suitesparse_config\suitesparse_config.o src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c: In function 'SuiteSparse_tic': src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c:358:21: error: storage size of 't' isn't known struct timespec t ; ^ src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c:359:5: warning: implicit declaration of function 'clock_gettime' [-Wimplicit-function-declaration] clock_gettime (CLOCK_MONOTONIC, &t) ; ^ src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c:359:20: error: 'CLOCK_MONOTONIC' undeclared (first use in this function) clock_gettime (CLOCK_MONOTONIC, &t) ; ^ src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c:359:20: note: each undeclared identifier is reported only once for each function it appears in src/C/SuiteSparse/SuiteSparse_config/SuiteSparse_config.c:358:21: warning: unused variable 't' [-Wunused-variable] struct timespec t ; ^ error: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1
I did some research into this and
error: storage size of 't' isn't known but i can't determine if it's CVXOPT's fault or Windows?
I'm using Python2.7 on Windows 10. Any suggestions or clarity on some of these issues would be great. Like I mentioned, just trying to get CVXPY working, but seem to be hung up on CVXOPT. Thanks!
I was able to get a working installation of CVXOPT by uninstalling the current numpy version I had and downloading / installing the numpy-mkl whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy. I then installed CVXOPT and CVXPY from the site as well. Finally was able to get a successful import cvxpy without the cvxopt.base DLL error.
Still would be curious about the compilation error I was having.