I'm trying to install quantlib
in python, using pycharm
. But I'm receiving this error:
ERROR: Could not find a version that satisfies the requirement QuantLib (from versions: none)
ERROR: No matching distribution found for QuantLib
[notice] A new release of pip available: 22.3.1 -> 23.1
[notice] To update, run: pip install --upgrade pip
I've upgraded pip
, but that was not the issue. I'm using python Python 3.7.16. I've even tried installing QuantLib
python library available in pypy
but the same result shows:
Collecting QuantLib-Python==1.18
Using cached QuantLib_Python-1.18-py2.py3-none-any.whl (1.4 kB)
ERROR: Could not find a version that satisfies the requirement QuantLib (from quantlib-python) (from versions: none)
ERROR: No matching distribution found for QuantLib
[notice] A new release of pip available: 22.3.1 -> 23.1
[notice] To update, run: pip install --upgrade pip
Like like @luigi-ballabio mentioned above : wheel for quantlib was not present for python 3.7 , arm architecture.
I was able to resolve this using the following steps :
Install Rosetta
Create a Rosetta terminal
Install X86 homebrew in the Rosetta terminal
Create an alias for the X86 homebrew in /usr/local/bin/brew
Use the X86 brew to install X86 python (ends up /usr/local/bin/python3)
Create a virtualenv based on the X86 python path
pip install quantlib