简体   繁体   中英

scikits.sparse installation(or build) fails on windows and anaconda (spyder)

I have been trying to install scikits.sparse module in python. I feel that the module I obtained needs compilation. I guessed the same as it doesn't contain .py files, instead there is a cholmod.c and a cholmod.pyx file in the sparse directory. I attempted to do this in 2 ways,

One from Spyder , by first adding the module path to PYTHONPATH manager and then including the following lines in the program

import pyximport

pyximport.install()

from scikits.sparse.cholmod import cholesky

This gave me the error

ImportError: Building module scikits.sparse.cholmod failed: ["distutils.errors.CompileError: command 'C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 14.0\\\\VC\\\\BIN\\\\x86_amd64\\\\cl.exe' failed with exit status 2\\n"]

Second directly in Python 3.6 ,

I installed Microsoft Visual C++ build tools 14.0 (from Visual Studio 2015), which looked like completed installation, but the final status said, It may not have installed properly.

Then I updated pip , installed cython , scipy and some other dependency of scikits.sparse then on attempting installation like th following,

python e:\python\scikits.sparse-0.2\setup.py install 

from command prompt returned an error,

Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

Is there anyway to compile and build scikits.sparse in windows?

Alternatively, is it possible to compile it in a Linux system to a .whl and then install it easily in windows?

Thanks in advance.

You just need to install C++ build tool. In my case it was the same as per yours ie "Microsoft Visual Studio 14.0" So I installed C++ build tool from the link given below.[landinghub.visualstudio.com/visual-cpp-build-tools][1]

This showed me 2015 version, and that solved my issue.

Hope it's gonna work same for you too. If not, leave the comment below.

Good Luck !

scikits-sparse 不是为 windows 构建的,只为 linux 构建

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM