Cannot import name 'solve_triangular' from 'pytensor.tensor.linalg'

It shows a different error now even though I have installed pytensor separately:

ModuleNotFoundError Traceback (most recent call last)
Cell In[16], line 2
1 import numpy as np
----> 2 import pymc as pm
3 import matplotlib.pyplot as plt
4 import arviz as az

File ~/anaconda3/envs/Kaushiki/lib/python3.10/site-packages/pymc/init.py:47
42 augmented = f"{augmented} -fno-unwind-tables -fno-asynchronous-unwind-tables"
44 pytensor.config.gcc__cxxflags = augmented
—> 47 __set_compiler_flags()
49 from pymc import _version, gp, ode, sampling
50 from pymc.backends import *

File ~/anaconda3/envs/Kaushiki/lib/python3.10/site-packages/pymc/init.py:30, in __set_compiler_flags()
28 def __set_compiler_flags():
29 # Workarounds for PyTensor compiler problems on various platforms
—> 30 import pytensor
32 current = pytensor.config.gcc__cxxflags
33 augmented = f"{current} -Wno-c++11-narrowing"

ModuleNotFoundError: No module named ‘pytensor’