Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
libnithomas opened this issue Jun 7, 2017 · 6 comments
Labels

Comments

@libnithomas
Copy link

Hello,

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?
I have downloaded the package from https://pypi.python.org/pypi/scikits.sparse

Thanks in advance.
Libni Thomas

@jor- jor- added the question label Jun 13, 2017
@jor-
Copy link
Collaborator

jor- commented Jun 13, 2017

Hello,

first of all scikits.sparse is an outdated package. The current packages is scikits-sparse and can be obtained from https://pypi.python.org/pypi/scikit-sparse.

I do not think it will work to compile a wheel for Linux and than use it in Windows because the binding to suitesparse will not work.

Furthermore I do not have any experience using scikit-sparse in Windows and can not give any support for Windows because I do not have it. Maybe https://github.com/jlblancoc/suitesparse-metis-for-windows will help you to install suitesparse. If you have a working installation, please write how you did it.

@ghost
Copy link

ghost commented Dec 5, 2017

Note that you should be able to use https://github.com/scikit-umfpack/scikit-umfpack-wheels to build wheels for all platforms (just fork the repository here). Yes, this does include windows, if you change setup.py to use the numpy.distutils.system_info.get_info('umfpack_info') function (except change the library name to 'choldmod' of course).

@ghost
Copy link

ghost commented Jan 29, 2018

@Jor I can build wheels if you grant me access to this organization and pypi. I also need to make a slight modification to setup.py.

@jor-
Copy link
Collaborator

jor- commented Mar 7, 2018

@ghost:

numpy.distutils.system_info.get_info('cholmod') does return an empty dict for me because the info for this library are not implemented in NumPy (https://github.com/numpy/numpy/blob/v1.14.0/numpy/distutils/system_info.py).

What modifications to setup.py do you suggest?

@EmJay276
Copy link
Contributor

I also had issues with this package and windows, I wrote a short guide how to install it:
https://github.com/EmJay276/scikit-sparse

@QWQY-kara
Copy link

Hello, why can't I install simulation, it shows

ERROR: Failed building wheel for scikit-sparse
Failed to build scikit-sparse
ERROR: Could not build wheels for scikit-sparse, which is required to install pyproject.toml-based projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants