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

Fix for scikit sparse dependency issue #7

Merged
merged 4 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ your choice:

`pip3 install --user --src /my/preferred/location --editable git+https://github.com/Deep-MI/Lapy.git#egg=lapy`

Several functions, e.g. the Solver, require a sparse matrix decomposition, for which either the LU decomposition (from scipy sparse) or the faster Cholesky decomposition (from scikit-sparse cholmod) can be used. If the parameter flag use_cholmod is True, the code will try to import cholmod from the scikit-sparse package and will fall back to LU if the import fails. If you would like to use cholmod, you need to install scikit-sparse separately. It cannot be listed among LaPy's dependencies (e.g. in setup.py or requirements.txt) as that causes errors with pip. scikit-sparse requires numpy and scipy to be installed separately beforehand.

## References:

If you use this software for a publication please cite both these papers:
Expand Down
3 changes: 3 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
numpy==1.17.4
scipy==1.3.1
plotly==5.5.0
19 changes: 7 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
#
# This file is autogenerated by pip-compile with python 3.8
# This file is autogenerated by pip-compile with python 3.6
# To update, run:
#
# pip-compile
#
numpy==1.21.4
numpy==1.17.4
# via
# LaPy (setup.py)
# scikit-sparse
# -r requirements.in
# scipy
plotly==5.3.1
# via LaPy (setup.py)
scikit-sparse==0.4.6
# via LaPy (setup.py)
scipy==1.7.2
# via
# LaPy (setup.py)
# scikit-sparse
plotly==5.5.0
# via -r requirements.in
scipy==1.3.1
# via -r requirements.in
six==1.16.0
# via plotly
tenacity==8.0.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ def get_version(rel_path):
# For an analysis of "install_requires" vs pip's requirements files see:
# https://packaging.python.org/en/latest/requirements.html
# install_requires=['peppercorn'], # Optional
install_requires=['numpy', 'scipy', 'plotly', 'scikit-sparse'],
install_requires=['numpy', 'scipy', 'plotly'],
)