haasad / PyPardiso

Python interface to the Intel MKL Pardiso library to solve large sparse linear systems of equations
BSD 3-Clause "New" or "Revised" License
133 stars 20 forks source link

Error: pip install pypardiso (Manjaro Linux - Python 3.9) #24

Closed adtzlr closed 2 years ago

adtzlr commented 3 years ago

Hi,

pypardiso can't be installed using pip on Manjaro because mkl-service is not available for Python 3.9 on PyPI.

[andreas@andreas-studioxps1640 ~]$ pip install pypardiso
Defaulting to user installation because normal site-packages is not writeable
Collecting pypardiso
  Downloading pypardiso-0.3.3-py3-none-any.whl (10 kB)
Requirement already satisfied: scipy in ./.local/lib/python3.9/site-packages (from pypardiso) (1.7.0)
Requirement already satisfied: numpy in /usr/lib/python3.9/site-packages (from pypardiso) (1.20.3)
Requirement already satisfied: psutil in /usr/lib/python3.9/site-packages (from pypardiso) (5.8.0)
  Downloading pypardiso-0.3.2-py3-none-any.whl (10 kB)
  Downloading pypardiso-0.3.1-py3-none-any.whl (10 kB)
Collecting mkl
  Downloading mkl-2021.3.0-py2.py3-none-manylinux1_x86_64.whl (278.6 MB)
     |████████████████████████████████| 278.6 MB 24 kB/s 
ERROR: Cannot install pypardiso==0.3.1, pypardiso==0.3.2 and pypardiso==0.3.3 because these package versions have conflicting dependencies.

The conflict is caused by:
    pypardiso 0.3.3 depends on mkl-service
    pypardiso 0.3.2 depends on mkl-service
    pypardiso 0.3.1 depends on mkl-service

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

see here, only files for Python 3.7 and 3.8. Is mkl-service really necessary? pip install mkl completes without errors...

haasad commented 2 years ago

Hi @adtzlr

for whatever reason I don't get notified anymore about new issues in my repos. Only just now saw this issue because I was mentioned in #26, which is possibly related.

Looking at https://pypi.org/project/mkl-service/#files, there seems to be no support for python 3.9 and also no support for macOS for mkl-service with pip.

I'll look into ways to get rid of it, however there's two hurdles that come to mind:

haasad commented 2 years ago

Hi @adtzlr ,

I removed the mkl-service dependency and changed how the mkl_rt shared library is detected, so it should now work on all operating systems when installing pypardiso with pip. I released version 0.4.0 with these changes today.

I hope this makes pypardiso useful for you again, IIRC it provided quite a speedup for the calculations in your package.

And sorry again for not replying earlier, I'll have to check my notification settings for this repo. Feel free to ping me directly with a @mention, if this happens again.

adtzlr commented 2 years ago

Thanks, that's great!