No module named 'scipy.sparse.linalg.eigen.arpack'; 'scipy.sparse.linalg.eigen' is not a package
YannickKae opened this issue · 2 comments
YannickKae commented
When I try to load your library, I get the following error message. Has Scipy changed anything recently or is the fault with me?
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_12036\3421158058.py in <module>
3 import yfinance as yf
4 import warnings
----> 5 import riskfolio as rp
6 import mosek
~\anaconda3\lib\site-packages\riskfolio\__init__.py in <module>
7 """
8
----> 9 from riskfolio.src import *
10 from riskfolio.external import *
11
~\anaconda3\lib\site-packages\riskfolio\src\__init__.py in <module>
7 """
8
----> 9 from .Portfolio import *
10 from .HCPortfolio import *
11 from .PlotFunctions import *
~\anaconda3\lib\site-packages\riskfolio\src\Portfolio.py in <module>
9 import numpy as np
10 import pandas as pd
---> 11 import cvxpy as cp
12 import scipy.stats as st
13 from scipy.linalg import sqrtm
~\anaconda3\lib\site-packages\cvxpy\__init__.py in <module>
16
17 __version__ = "1.1.13"
---> 18 from cvxpy.atoms import *
19 from cvxpy.constraints import NonPos, Zero, SOC, PSD
20 from cvxpy.expressions.expression import Expression
~\anaconda3\lib\site-packages\cvxpy\atoms\__init__.py in <module>
15 """
16
---> 17 from cvxpy.atoms.cummax import cummax
18 from cvxpy.atoms.dist_ratio import dist_ratio
19 from cvxpy.atoms.eye_minus_inv import eye_minus_inv, resolvent
~\anaconda3\lib\site-packages\cvxpy\atoms\cummax.py in <module>
15 """
16
---> 17 from cvxpy.atoms.atom import Atom
18 from cvxpy.atoms.axis_atom import AxisAtom
19 import numpy as np
~\anaconda3\lib\site-packages\cvxpy\atoms\atom.py in <module>
20 from cvxpy import utilities as u
21 from cvxpy.expressions import cvxtypes
---> 22 from cvxpy.expressions.constants import Constant
23 from cvxpy.expressions.expression import Expression
24 from cvxpy.utilities import performance_utils as perf
~\anaconda3\lib\site-packages\cvxpy\expressions\constants\__init__.py in <module>
15 """
16
---> 17 from .constant import Constant
18 from .callback_param import CallbackParam
19 from .parameter import Parameter
~\anaconda3\lib\site-packages\cvxpy\expressions\constants\constant.py in <module>
25 from cvxpy.utilities import performance_utils as perf
26 from scipy.sparse.linalg import eigsh
---> 27 from scipy.sparse.linalg.eigen.arpack.arpack import ArpackError
28
29
ModuleNotFoundError: No module named 'scipy.sparse.linalg.eigen.arpack'; 'scipy.sparse.linalg.eigen' is not a package
dcajasn commented
YannickKae commented
Strangely enough, it worked again when I restarted my computer.
Thanks for your quick reply yesterday. You can close.