Open Sanchitamallickroy opened 2 years ago
Hello,
from cvxstoc import NormalRandomVariable, expectation, prob from cvxpy import Maximize, Problem from cvxpy.expressions.variable import Variable import numpy ###### Create problem data. n = 10 mu = numpy.zeros(n) Sigma = 0.1*numpy.eye(n) p = NormalRandomVariable(mu, Sigma) alpha = -1 beta = 0.05 x = Variable(n) p = Problem(Maximize(expectation(x.T*p, num_samples=100)), [x >= 0, x.T*numpy.ones(n) == 1, prob(x.T*p <= alpha, num_samples=100) <= beta]) p.solve(verbose=True)
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_17832\4082492399.py in <cell line: 1>() ----> 1 from cvxstoc import NormalRandomVariable, expectation, prob 2 from cvxpy import Maximize, Problem 3 from cvxpy.expressions.variable import Variable 4 import numpy 5 ~\anaconda3\lib\site-packages\cvxstoc\__init__.py in <module> ----> 1 from cvxstoc.expectation import expectation 2 from cvxstoc.random_variable import ( 3 RandomVariable, 4 RandomVariableFactory, 5 NormalRandomVariable, ~\anaconda3\lib\site-packages\cvxstoc\expectation.py in <module> 4 from cvxpy.transforms.partial_optimize import PartialProblem 5 ----> 6 from cvxstoc.random_variable import RandomVariable 7 from cvxstoc.utils import replace_rand_vars 8 ~\anaconda3\lib\site-packages\cvxstoc\random_variable.py in <module> 1 import copy 2 ----> 3 import pymc.Model, pymc.MCMC 4 5 import numpy ModuleNotFoundError: No module named 'pymc.Model'
Is there any available solution yet?
I am having the same issue... any updates?
Not yet,
Hello,
I am trying to run portfolio optimization example.
but following error is coming
How to solve this issue? I have installed pymc separately. Still the problem is coming. My OS is windows 10.