Closed strozzascotte closed 1 year ago
Hi @strozzascotte, follow installation instructions section in docs.
Hi @dcajasn, thanks for the fast reply.
I followed the installation instructions. This is what I did:
conda
environment:
conda create --name rfenv
conda activate rfenv
pybind11
:
pip install pybind11
cvxpy
:
pip install cvxpy
Tried to install riskfolio-lib
which gave me the errors mentioned above:
pip install riskfolio-lib
Collecting riskfolio-lib
Using cached Riskfolio-Lib-4.0.3.tar.gz (12.9 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.17.0 in ./miniconda3/lib/python3.8/site-packages (from riskfolio-lib) (1.20.3)
Requirement already satisfied: scipy>=1.0.1 in ./miniconda3/lib/python3.8/site-packages (from riskfolio-lib) (1.10.1)
Requirement already satisfied: pandas>=1.0.0 in ./miniconda3/lib/python3.8/site-packages (from riskfolio-lib) (1.3.4)
Requirement already satisfied: matplotlib>=3.3.0 in ./miniconda3/lib/python3.8/site-packages (from riskfolio-lib) (3.4.3)
Requirement already satisfied: cvxpy>=1.0.25 in ./miniconda3/lib/python3.8/site-packages (from riskfolio-lib) (1.1.15)
Requirement already satisfied: scikit-learn>=0.22.0 in ./miniconda3/lib/python3.8/site-packages (from riskfolio-lib) (1.2.2)
Requirement already satisfied: statsmodels>=0.10.1 in ./miniconda3/lib/python3.8/site-packages (from riskfolio-lib) (0.13.0)
Collecting arch>=4.15
Downloading arch-5.3.1-cp38-cp38-macosx_10_9_x86_64.whl (876 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 876.1/876.1 kB 2.3 MB/s eta 0:00:00
Collecting xlsxwriter>=1.3.7
Downloading XlsxWriter-3.0.9-py3-none-any.whl (152 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 152.8/152.8 kB 5.5 MB/s eta 0:00:00
Requirement already satisfied: networkx>=2.5.1 in ./miniconda3/lib/python3.8/site-packages (from riskfolio-lib) (3.0)
Collecting astropy>=4.3.1
Downloading astropy-5.2.1-cp38-cp38-macosx_10_9_x86_64.whl (7.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 10.8 MB/s eta 0:00:00
Requirement already satisfied: pybind11>=2.10.1 in ./miniconda3/lib/python3.8/site-packages (from riskfolio-lib) (2.10.3)
Collecting property-cached>=1.6.4
Using cached property_cached-1.6.4-py2.py3-none-any.whl (7.8 kB)
Collecting pyerfa>=2.0
Downloading pyerfa-2.0.0.1-cp38-cp38-macosx_10_9_x86_64.whl (343 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 343.6/343.6 kB 8.6 MB/s eta 0:00:00
Requirement already satisfied: PyYAML>=3.13 in ./miniconda3/lib/python3.8/site-packages (from astropy>=4.3.1->riskfolio-lib) (6.0)
Requirement already satisfied: packaging>=19.0 in ./miniconda3/lib/python3.8/site-packages (from astropy>=4.3.1->riskfolio-lib) (23.0)
Requirement already satisfied: osqp>=0.4.1 in ./miniconda3/lib/python3.8/site-packages (from cvxpy>=1.0.25->riskfolio-lib) (0.6.2.post0)
Requirement already satisfied: ecos>=2 in ./miniconda3/lib/python3.8/site-packages (from cvxpy>=1.0.25->riskfolio-lib) (2.0.7.post1)
Requirement already satisfied: scs>=1.1.6 in ./miniconda3/lib/python3.8/site-packages (from cvxpy>=1.0.25->riskfolio-lib) (2.1.4)
Requirement already satisfied: python-dateutil>=2.7 in ./miniconda3/lib/python3.8/site-packages (from matplotlib>=3.3.0->riskfolio-lib) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in ./miniconda3/lib/python3.8/site-packages (from matplotlib>=3.3.0->riskfolio-lib) (1.4.4)
Requirement already satisfied: pillow>=6.2.0 in ./miniconda3/lib/python3.8/site-packages (from matplotlib>=3.3.0->riskfolio-lib) (9.4.0)
Requirement already satisfied: pyparsing>=2.2.1 in ./miniconda3/lib/python3.8/site-packages (from matplotlib>=3.3.0->riskfolio-lib) (3.0.9)
Requirement already satisfied: cycler>=0.10 in ./miniconda3/lib/python3.8/site-packages (from matplotlib>=3.3.0->riskfolio-lib) (0.11.0)
Requirement already satisfied: pytz>=2017.3 in ./miniconda3/lib/python3.8/site-packages (from pandas>=1.0.0->riskfolio-lib) (2022.7.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in ./miniconda3/lib/python3.8/site-packages (from scikit-learn>=0.22.0->riskfolio-lib) (3.1.0)
Requirement already satisfied: joblib>=1.1.1 in ./miniconda3/lib/python3.8/site-packages (from scikit-learn>=0.22.0->riskfolio-lib) (1.2.0)
Requirement already satisfied: patsy>=0.5.2 in ./miniconda3/lib/python3.8/site-packages (from statsmodels>=0.10.1->riskfolio-lib) (0.5.2)
Requirement already satisfied: qdldl in ./miniconda3/lib/python3.8/site-packages (from osqp>=0.4.1->cvxpy>=1.0.25->riskfolio-lib) (0.1.5.post0)
Requirement already satisfied: six in ./miniconda3/lib/python3.8/site-packages (from patsy>=0.5.2->statsmodels>=0.10.1->riskfolio-lib) (1.16.0)
Building wheels for collected packages: riskfolio-lib
Building wheel for riskfolio-lib (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [132 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-cpython-38
creating build/lib.macosx-10.9-x86_64-cpython-38/riskfolio
copying riskfolio/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio
creating build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/HCPortfolio.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/DBHT.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/Reports.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/PlotFunctions.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/OwaWeights.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/ParamsEstimation.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/AuxFunctions.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/Portfolio.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/ConstraintsFunctions.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/GerberStatistic.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/RiskFunctions.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
creating build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/external
copying riskfolio/external/cppfunctions.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/external
copying riskfolio/external/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/external
running build_ext
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/marco/miniconda3/include -fPIC -O2 -isystem /Users/marco/miniconda3/include -I/Users/marco/miniconda3/include/python3.8 -c flagcheck.cpp -o flagcheck.o -std=c++17
building 'riskfolio.external.functions' extension
creating build/temp.macosx-10.9-x86_64-cpython-38
creating build/temp.macosx-10.9-x86_64-cpython-38/riskfolio
creating build/temp.macosx-10.9-x86_64-cpython-38/riskfolio/external
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/marco/miniconda3/include -fPIC -O2 -isystem /Users/marco/miniconda3/include -DVERSION_INFO=4.0.3 -I/Users/marco/miniconda3/lib/python3.8/site-packages/numpy/core/include -I/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include -I/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include -I/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external -I/Users/marco/miniconda3/lib/python3.8/site-packages/pybind11/include -I/Users/marco/miniconda3/include/python3.8 -c riskfolio/external/cpp_functions_bindings.cpp -o build/temp.macosx-10.9-x86_64-cpython-38/riskfolio/external/cpp_functions_bindings.o -std=c++17 -mmacosx-version-min=10.14 -fvisibility=hidden -g0 -stdlib=libc++ -DARMA_DONT_USE_WRAPPER
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:132:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/fill.hpp:75:89: error: expected unqualified-id
template<> inline bool isfinite_wrapper(float x) { return std::isfinite(x); }
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:132:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/fill.hpp:76:89: error: expected unqualified-id
template<> inline bool isfinite_wrapper(double x) { return std::isfinite(x); }
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:132:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/fill.hpp:77:89: error: expected unqualified-id
template<typename T> inline bool isfinite_wrapper(std::complex<T>& x) { return std::isfinite(x.real()) && std::isfinite(x.imag()); }
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:132:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/fill.hpp:77:116: error: expected unqualified-id
template<typename T> inline bool isfinite_wrapper(std::complex<T>& x) { return std::isfinite(x.real()) && std::isfinite(x.imag()); }
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:44:15: error: expected unqualified-id
return std::isfinite(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:54:15: error: expected unqualified-id
return std::isfinite(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:88:15: error: expected unqualified-id
return std::isinf(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:160:5: note: expanded from macro 'isinf'
( sizeof(x) == sizeof(float) ? __inline_isinff((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:98:15: error: expected unqualified-id
return std::isinf(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:160:5: note: expanded from macro 'isinf'
( sizeof(x) == sizeof(float) ? __inline_isinff((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:134:15: error: expected unqualified-id
return std::isnan(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
( sizeof(x) == sizeof(float) ? __inline_isnanf((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:144:15: error: expected unqualified-id
return std::isnan(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
( sizeof(x) == sizeof(float) ? __inline_isnanf((float)(x)) \
^
10 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for riskfolio-lib
Running setup.py clean for riskfolio-lib
Failed to build riskfolio-lib
Installing collected packages: xlsxwriter, pyerfa, property-cached, astropy, arch, riskfolio-lib
Running setup.py install for riskfolio-lib ... error
error: subprocess-exited-with-error
× Running setup.py install for riskfolio-lib did not run successfully.
│ exit code: 1
╰─> [134 lines of output]
running install
/Users/marco/miniconda3/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-cpython-38
creating build/lib.macosx-10.9-x86_64-cpython-38/riskfolio
copying riskfolio/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio
creating build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/HCPortfolio.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/DBHT.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/Reports.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/PlotFunctions.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/OwaWeights.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/ParamsEstimation.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/AuxFunctions.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/Portfolio.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/ConstraintsFunctions.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/GerberStatistic.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
copying riskfolio/src/RiskFunctions.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/src
creating build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/external
copying riskfolio/external/cppfunctions.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/external
copying riskfolio/external/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-38/riskfolio/external
running build_ext
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/marco/miniconda3/include -fPIC -O2 -isystem /Users/marco/miniconda3/include -I/Users/marco/miniconda3/include/python3.8 -c flagcheck.cpp -o flagcheck.o -std=c++17
building 'riskfolio.external.functions' extension
creating build/temp.macosx-10.9-x86_64-cpython-38
creating build/temp.macosx-10.9-x86_64-cpython-38/riskfolio
creating build/temp.macosx-10.9-x86_64-cpython-38/riskfolio/external
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/marco/miniconda3/include -fPIC -O2 -isystem /Users/marco/miniconda3/include -DVERSION_INFO=4.0.3 -I/Users/marco/miniconda3/lib/python3.8/site-packages/numpy/core/include -I/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include -I/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include -I/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external -I/Users/marco/miniconda3/lib/python3.8/site-packages/pybind11/include -I/Users/marco/miniconda3/include/python3.8 -c riskfolio/external/cpp_functions_bindings.cpp -o build/temp.macosx-10.9-x86_64-cpython-38/riskfolio/external/cpp_functions_bindings.o -std=c++17 -mmacosx-version-min=10.14 -fvisibility=hidden -g0 -stdlib=libc++ -DARMA_DONT_USE_WRAPPER
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:132:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/fill.hpp:75:89: error: expected unqualified-id
template<> inline bool isfinite_wrapper(float x) { return std::isfinite(x); }
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:132:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/fill.hpp:76:89: error: expected unqualified-id
template<> inline bool isfinite_wrapper(double x) { return std::isfinite(x); }
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:132:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/fill.hpp:77:89: error: expected unqualified-id
template<typename T> inline bool isfinite_wrapper(std::complex<T>& x) { return std::isfinite(x.real()) && std::isfinite(x.imag()); }
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:132:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/fill.hpp:77:116: error: expected unqualified-id
template<typename T> inline bool isfinite_wrapper(std::complex<T>& x) { return std::isfinite(x.real()) && std::isfinite(x.imag()); }
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:44:15: error: expected unqualified-id
return std::isfinite(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:54:15: error: expected unqualified-id
return std::isfinite(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:155:5: note: expanded from macro 'isfinite'
( sizeof(x) == sizeof(float) ? __inline_isfinitef((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:88:15: error: expected unqualified-id
return std::isinf(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:160:5: note: expanded from macro 'isinf'
( sizeof(x) == sizeof(float) ? __inline_isinff((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:98:15: error: expected unqualified-id
return std::isinf(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:160:5: note: expanded from macro 'isinf'
( sizeof(x) == sizeof(float) ? __inline_isinff((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:134:15: error: expected unqualified-id
return std::isnan(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
( sizeof(x) == sizeof(float) ? __inline_isnanf((float)(x)) \
^
In file included from riskfolio/external/cpp_functions_bindings.cpp:11:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/riskfolio/external/matrix_functions.cpp:9:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/carma-0.6.6/include/carma:21:
In file included from /private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo:391:
/private/var/folders/sv/55n991t57hl_bl_sb_0w7qnh0000gn/T/pip-install-otxxfwg3/riskfolio-lib_a4691d5fc5444eb5a35becb3d731a7c6/lib/armadillo-11.4.1/include/armadillo_bits/arma_cmath.hpp:144:15: error: expected unqualified-id
return std::isnan(x);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
( sizeof(x) == sizeof(float) ? __inline_isnanf((float)(x)) \
^
10 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package. ╰─> riskfolio-lib
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
If I install 3.3.0 version I have no problem.
Do you have installed rosetta in your mac?
I'm still on Intel processor.
I don't know what is happening, because I developed Riskfolio-Lib 4.0.3 on a macbook air 2012, and works fine. But I've never use miniconda or recommend to use it. Last version works on google colab.
Hi @strozzascotte, install version 4.1.0
Installed without any issue. Thank you very much @dcajasn.
Hi, I previously installed Riskfolio (3.3.0) without problem, but I can't do it any more.
OS: MacOS 13.2.1 Python: 3.10.9
When I try a pip install (
pip install riskfolio-lib
) I get the following errors which seem to be all related to an issue witharmadillo-11.4.1
. I can install a recent version of Armadillo compiled libraries withbrew
, but I don't know if it's possible to use it with Riskfolio instead of the supplied one or how to do it.Thank in advance for your help.
[...]