How to fix the RuntimeError "Invalid Parameter" on demo code

I am using Spyder on a Linux (Ubuntu distribution) machine, where I’ve installed FEniCS through Anaconda. I am working through the Poisson demo file to be sure that I understand the software and that it’s working properly.
(Here’s where we figured out how to have Spyder recognize the demo code: Using the fenics project with spyder - #9 by EngineerMama )

Now that I’ve updated the code, I get the following error “RuntimeError: Invalid parameter: form_compiler” from
File "/usr/lib/petsc/lib/python3/dist-packages/dolfin/parameter/__init__.py", line 27, in __getitem__ raise RuntimeError("Invalid parameter: {}".format(key))

When I check the (init.py) file, I can’t tell what’s got the code upset. All I did to the demo code was make it more Pythonic and update the Expression to include the degree, like the Springer tutorial book says to do.

Here’s the code:

And here’s the output from the IDE (Spyder):

It would be helpful if you post the code such that we can copy and paste it. Screenshots of code aren’t very useful.

Initial impression looks like something funny may be going on with your installation. Perhaps FFC isn’t installed correctly?

1 Like

Hi EngineerMama,

I think @nate is likely correct:

The error you’re getting occurs in the file

/usr/lib/petsc/lib/python3/dist-packages/dolfin/parameter/__init__.py

which is outside of your conda installation. I confirmed that in my working installation, similar function calls are instead directed to:

~/anaconda3/envs/fenics2/lib/python3.8/site-packages/dolfin/parameter/__init__.py

which is inside the conda environment named fenics2. (Note: my environment is named fenics2 instead of fenicsproject.) I’d suggest checking which Python interpreter is being used to run your script. On the statusbar at the bottom of the Spyder window, you’ll see something like this:

This tells me my interpreter is running within the conda fenics2 environment. If your Spyder is not running within the correct environment, try going to Tools > Preferences > Python Interpreter, choosing “Use the following Python interpreter”, and then selecting the Python executable from within your fenicsproject environment. (For me, this was /home/connor/anaconda3/envs/fenics2/bin/python.)

This is a bit of a shot in the dark, but I hope it helps.

Regards,
Connor

3 Likes

@nate
Sorry Nate, I misunderstood the “copy code” part of the posting instructions and used a screenshot. I will definitely copy so that code can be used in future posts. I am just starting my Linux/Python/FEniCS journey and I appreciate the feedback!

On the other hand, your point about:

This got me thinking, and with a reboot, I was able to get the code working. (A screenshot of output is below - that seems to be proper since it is capturing what my machine is doing and wouldn’t need to be pasted for replication)

@conpierce8
Connor,
With your points about inside/outside the conda environment, I had tried (I thought unsuccessfully) to install FEniCS with the Ubuntu commands, then I used the Anaconda download instructions. My version of Spyder that is connected to a working FEniCS installation is Spyder 3 (Python 3.8) so it has a different status bar, but from the user warning in the output (about a syntax update that I didn’t catch before running) I can confirm that the “Default” Python interpreter is outside the conda environment.

I can find the same path the program is using:

I can also find the path to the interpreter that you suggest, (for me it is home/kristin/anaconda3/envs/fenicsproject/bin/python), but when I set that path and try to open a console to check the program in Spyder via Anaconda, I get this:

If I open the Anaconda app, it doesn’t recognize that Spyder (red ellipse) is installed in the fencsproject environment (blue ellipse)…

This is confusing because the base environment’s version of Spyder (5.0) is not the one I opened, but the fenicsproject environment’s version appears to be functional only when it uses the Default path outside of conda. :woman_shrugging:t2:

Aside: The main reason why I want to understand these quirks is when the FE equations get beyond the demo code, they may break for other reasons, so understanding what FEniCS (or maybe it’s Python?) is doing with the demo code seems important, especially since the tutorial book and the Github syntax have to be melded and mended to run anyways.

2 Likes

And here’s the running code and output - since it’s a tutorial code, I didn’t think I should remove the comments or extra spaces even thought we’re supposed to make it a “minimum working example”…

"""This demo program solves Poisson's equation
    - div grad u(x, y) = f(x, y)

on the unit square with source f given by
    f(x, y) = 10*exp(-((x - 0.5)^2 + (y - 0.5)^2) / 0.02)

and boundary conditions given by
    u(x, y) = 0        for x = 0 or x = 1
du/dn(x, y) = sin(5*x) for y = 0 or y = 1
"""

# Copyright (C) 2007-2011 Anders Logg
#
# This file is part of DOLFIN.
# DOLFIN is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# DOLFIN is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
#
# First added:  2007-08-16
# Last changed: 2021-05 by EngineerMama
#  Revised to include ft01_poisson.py syntax updates & error calcs

# Begin demo
# Import needed modules
import fenics as fe
#from dolfin import *   # wildcard imports not Python-recommended 
#dir()   # proved that fenics & dolfin imports the same things
import matplotlib.pyplot as plt
import numpy as np

# Create mesh and define function space
mesh = fe.UnitSquareMesh(32, 32)
V = fe.FunctionSpace(mesh, "Lagrange", 1)

# Define Dirichlet boundary (x = 0 or x = 1)
def boundary(x):
    return x[0] < fe.DOLFIN_EPS or x[0] > 1.0 - fe.DOLFIN_EPS

# Define boundary condition
u0 = fe.Constant(0.0)
bc = fe.DirichletBC(V, u0, boundary)

# Define variational problem
u = fe.TrialFunction(V)
v = fe.TestFunction(V)
f = fe.Expression("10*exp(-(pow(x[0]-0.5, 2) + pow(x[1]-0.5, 2)) / 0.02)",degree=1)
g = fe.Expression("sin(5*x[0])",degree=1)
a = fe.inner(fe.grad(u), fe.grad(v))*fe.dx
L = f*v*fe.dx + g*v*fe.ds

# Compute solution
u = fe.Function(V)
fe.solve(a == L, u, bc)

# Save solution to file in VTK format
vtkfile = fe.File("poisson/solution.pvd")
vtkfile << u

# Plot solution and mesh
fe.plot(u)
fe.plot(mesh)

# Compute error in L2 norm
error_L2 = fe.errornorm(u0, u, 'L2')

# Compute & Print maximum error at vertices
vertex_vals_u0 = u0.compute_vertex_values(mesh)
vertex_vals_u = u.compute_vertex_values(mesh)
error_max = np.max(np.abs(vertex_vals_u0 - vertex_vals_u))
print('Error L2 = ', error_L2)
print('Max Error = ', error_max)

# Hold plot
plt.show()

2 Likes

Hi Kristin,

I’m glad it’s working now. I’m afraid I can’t be much help because I haven’t used Anaconda Navigator much. I did my install using conda from the terminal. I’m not an expert in Anaconda/Spyder/FEniCS, by any means, but I had to fight through all of this just a month or so ago, so it’s still fresh in my mind :joy:. With that being said, here’s few things that might help to debug your installation:

I got the same error just a couple of weeks ago. Installing spyder-kernels in the fenicsproject environment fixed it for me. Be sure to include the version number as it’s specified in the error message (the “=0.*” is important), because if you install the wrong version and then try to correct it, conda might not be able to calculate a compatible environment with the correct version. (That’s why my environment is fenics2, and not fenics :sob:.)

There are possibly two Python interpreters associated with Spyder, one interpreter used to run the spyder module, and one (possibly different) interpreter used to start the console and run your scripts. I have spyder installed in the base environment and running in the base environment’s interpreter. My consoles run in the fenics2 environment because of the setting I described in my last post. I have spyder-kernels installed in the fenics2 environment.

I agree, definitely confusing! Maybe Spyder is installed somewhere else on your system? You can see which interpreter is running Spyder and where Spyder is located from the Task Manager. With Spyder running, open the Task Manager, find the “python3.8” processes in the list, and hover over them one-by-one until you find the one associated with Spyder. The tooltip will show the command used to start the process. On my system, I see:

/home/connor/anaconda3/bin/python /home/connor/anaconda3/bin/spyder

which tells me that Python in my base environment (/home/connor/anaconda3/bin/python) is being used to run the script /home/connor/anaconda3/bin/spyder.

I’m stumped on this one. I don’t know how Anaconda Navigator works, but maybe there’s some way to activate the fenicsproject environment before trying to launch Spyder? (Maybe this is handled automatically behind-the-scenes, I’m not sure…)

-Connor

2 Likes

So, this morning, I thought I’d fix this by opening a fresh Terminal and change from base environment to FEniCS using

conda activate fenicsproject

then within it I tried

conda update spyder

and got this error:

image

so I thought, well, let’s just reinstall all of Spyder, not just the kernels… and I got all the “incompatible” errors that this guy did, plus extras because I have up to Python 3.9

To top it all off, the version of Spyder (3.3.6) that I opened from the applications menu on my Linux machine (that was working yesterday) is now back to THE SAME ERROR.

I checked that I set the interpreter to /home/kristin/anaconda3/envs/fenicsproject/bin/python, and it still showed the same error; I looked in the System Monitor (that’s what my machine calls the Task Manager) all the python3.8 processes are coming from /usr/bin/python3.8 and the Spyder process is coming from /usr/bin/python3.8 /usr/bin/spyder3

I also (obviously) don’t know how Anaconda is supposed to work, but even rebooting and launching Spyder from the Terminal (after activating fenicsproject) instead of from the App icon, I get the notice that

Attribute Qt::AA_UseSoftwareOpenGL must be set before QCoreApplication is created.

and then it open Spyder3 and shows the same console error wanting kernels. :woman_shrugging:t2:
So I close Spyder, go back to the Terminal and entered the requested conda install spyder-kernels=0.* and get this:

I agree with :sob:

from the Github advice, I ran

conda search fenics --channel conda-forge

and got the Name, Version, Build and channel, but IDK what to do with this.

1 Like

It sure seems like something’s not right, but I’m at a loss to explain what’s wrong.

If you have the time and/or interest in doing a fresh installation, I documented a procedure that produces a working installation for me: GitHub - conpierce8/fenics-with-spyder: Installation "recipe" to get the FEniCS environment up and running with Spyder.

2 Likes

Thanks Connor @conpierce8
I read through the notebook and I’m willing to try the recipe, but first should I run

sudo apt-get purge --auto-remove fenics

to clear out FEniCS and all its configuration and dependent packages?
I also found the command with this as the next step
sudo ppa-purge ppa:fenics-packages/fenics-1.6.x
but I think the -1.6.x must be dependent on the installation, but all I can find is that my version is 2019.1.0

My research suggests that I should do this to keep from having things go cross-ways - but I also figure this only removes it from Ubuntu. To get it removed out of Anaconda, I think the command is

conda rm -rf fenicsproject

but the force recursive option always makes me nervous!!!

So, I would greatly appreciate your thoughts as a second option on the cleaning process, and in return I’ll gladly help you add a section to the notebook about it!

1 Like

Hi Kristin,

I’m quite new to Linux, so I don’t know the answer to this one. It seems like it would be a good idea. With that being said, when I first installed FEniCS, I misunderstood the installation instructions and I thought the Ubuntu packages were a prerequisite for installing with Anaconda. I’ve had the Ubuntu packages and conda packages simultaneously installed ever since then, and haven’t run into any issues yet.

Not sure about this, either, but I think you’re right about the 1.6.x. That sounds like a pretty old version of fenics. I’m not well-versed in FEniCS history, but it seems that they switched from 1.x.x numbering to YYYY.x.x numbering in 2016. If you decide to run this command, my guess is you should try it without the -1.6.x, i.e.:

sudo ppa-purge ppa:fenics-packages/fenics

based on what I see in my apt sources files.

I believe the correct command should be

conda env remove fenicsproject

No -rf needed, and it shouldn’t mess anything up because (at least as far as I understand it) conda environments are designed to be totally encapsulated.

I’d be glad to have any of your inputs on the notebook. :slightly_smiling_face:

2 Likes

I wanted to double-check syntax even though I didn’t run this… should it be
conda env remove -n fenicsproject
?
conda remove -n fenicsproject --all also works, I just want to be sure I understand the differences in syntax (why you didn’t use -n) as I found the other remove in a chat thread over on stack overflow. But I decided to try skipping to the part where you link Spyder in Anaconda after I removed my second install with the sudo command.

Also, I made a few notes about the (base) or (fenicsproject) prepend in your notebook.

This is also the whole reason why I have both installs! :woman_facepalming:t2:
My history with multiple instances of the same program in different directories is that it’s not good, so that’s my main reason for purging before trying your way of loading Spyder.

Again, I just want to wrap my brain around what those two commands are doing… and upon further reflection I agree the rm -rf wouldn’t have been right.

I now am getting a Module Not Found Error… which means your instructions are great!

1 Like

These have the same effect. The conda remove command removes packages from an environment. The -n flag allows you to remove packages from environments other than the activate environment. When you use --all, it deletes the entire environment.

The conda env command actually calls a separate package, conda-env, which (as its name implies) manages conda environments.

So conda’s job is to manage packages; conda-env’s job is to manage environments. conda may also need to manage environments (e.g. if you tell it to install a package to an environment that doesn’t exist, it has to create the environment before installing the package), but conda-env doesn’t manage packages. I like to use conda-env for environment stuff and conda for package stuff because I’m that type of person, but both syntaxes (conda remove -n fenicsproject --all and conda env remove -n fenicsproject) have the same effect in this case.

Good question. You have to deactivate the fenicsproject environment before you can remove it, e.g. by conda activate base.

2 Likes

I figure the last error is because of where Spyder is looking for its Python interpreter.
image

So, I think I need to to install the package into the same environment in which I installed Spyder (idea from here)

Do you think that by running

conda activate fenicsproject
conda install matplotlib
conda install numpy 

etc. for any other package needed by the tutorial code that it will fix the issue?

Or do you know of another way that would link fenicsproject environment up tot he other installed packages? I am thinking that there isn’t one…this is part of the Anaconda point - only stuff in the environment is accessible by the environment, so you have to build/install whatever is needed into the environment so that if you end up with a program for distribution, it is self-contained.

Finally,

How you you want me to get my suggested edits to you? Do you want me to open a pull request on Github and upload it there? I’ve not done that before, but from the documentation it seems easy enough to do.

1 Like

Connor, @conpierce8

So, to clarify, I used the Github instructions to make Spyder work with the fenicsproject environment from the base environment after purging with the sudo info from the 10th post.

Then, the new Spyder 5.0 does open, and with the Pythonic edits I show in the code pasted into the 4th entry on May 19th, there’s now no triangle syntax warning, where the original demo code still shows the warnings. So that’s fixed.
However, both codes, when trying to run them say either that “Matplotlib is required to plot from Python.” or that “ModuleNotFoundError: No module named ‘matplotlib’” if I try to use the line
import matplotlib.pyplot as plt

First I commented out any plot commands, and the code works (will calculate the error and generate the vtkfiles), so there’s a numpy available to FEniCS.
I then tried adding matplotlib to the FEniCS environment (fenicsproject) with conda install matplotlib but got a giant amount of package conflicts, so I quit for the day.
When I restarted the computer, opening a fresh Terminal window and running

conda activate fenicsproject
spyder

I am back to the Spyder 3 and the kernel error. Terminal says

but when I run

conda activate base
spyder

I still get Spyder 5 with the matplotlib errors from yesterday (!) and Terminal says:

So, I am now back to Nate’s idea @nate that there’s possibly something wrong with the installation, because I can’t imagine that FEniCS would have a package that excludes matplotlib.

The frustrating thing is that for one brief moment the code not only ran, but generated the plots and I can’t understand why and I don’t know how to fix it.
I tried from this thread:

and here’s some of the Terminal input/output because it will not all fit, it was the same amount of package conflicts that I got yesterday, in case something in here makes sense to someone why there’s a matplotlib conflict, but Spyder won’t find the module :woman_shrugging:t2::

(base) kristin@mypc:~$ conda list matplotlib
# packages in environment at /home/kristin/anaconda3:
# Name Version Build Channel
matplotlib 3.3.4 py38h06a4308_0
matplotlib-base 3.3.4 py38h62a2d02_0

(base) kristin@mypc:~$ conda activate fenicsproject
(fenicsproject) kristin@mypc:~$ conda list matplotlib
# packages in environment at /home/kristin/anaconda3/envs/fenicsproject:
#
# Name Version Build Channel

(fenicsproject) kristin@mypc:~$ conda activate base
(base) kristin@mypc:~$ conda install -n fenicsproject matplotlib
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining conflict for spyder-kernels jupyter_client ipykernel: : 124it [01:09, Examining conflict for spyder-kernels jupyter_core jupyter_client ipykernel: : 1Examining conflict for spyder-kernels wurlitzer: : 125it [01:09, 9.65it/s] Examining conflict for gcc_linux-64 gxx_linux-64 gcc_impl_linux-64 gxx_impl_linuExamining conflict for binutils_linux-64 gxx_linux-64 gxx_impl_linux-64 gcc_implExamining conflict for gcc_linux-64 gxx_linux-64: : 129it [01:09, 10.67it/s] failed

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:
- backcall -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']
- ipython_genutils -> python[version='>=2.7,<2.8.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0']
- pexpect -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0']
- ptyprocess -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0']
- python-dateutil -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
- wcwidth -> python[version='>=2.7,<2.8.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0']
- wheel -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.5,<3.6.0a0']
- wurlitzer -> python[version='<3.4']

Your python: python=3.9

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package libstdcxx-ng conflicts for:
pyzmq -> python[version='>=3.6,<3.7.0a0'] -> libstdcxx-ng[version='>=7.2.0']
ipykernel -> python[version='>=3.9,<3.10.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
boost-cpp -> libboost==1.73.0=h3ff78a5_11 -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=7.5.0']
fenics-dolfin -> pybind11[version='>=2.6.2,<2.6.3.0a0'] -> libstdcxx-ng[version='>=7.3.0']
python=3.9 -> libffi[version='>=3.3,<3.4.0a0'] -> libstdcxx-ng[version='>=7.5.0']
pybind11 -> libstdcxx-ng[version='>=7.3.0|>=9.3.0']
mumps-mpi -> metis[version='>=5.1.0,<5.2.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=9.3.0']
binutils_impl_linux-64 -> libstdcxx-ng[version='>=7.3.0']
pyzmq -> libstdcxx-ng[version='>=7.3.0']
readline -> ncurses[version='>=6.2,<7.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
pybind11-global -> libstdcxx-ng[version='>=9.3.0']
gxx_linux-64 -> libstdcxx-ng==7.2.0=h24385c6_1
gmp -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=7.5.0']
zeromq -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
fenics-libdolfin -> cmake[version='>=3.9'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
ncurses -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
libcurl -> krb5[version='>=1.17.1,<1.18.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=9.3.0']
petsc -> hypre[version='>=2.18.2,<2.19.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
wcwidth -> python -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
pexpect -> python -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
gcc_impl_linux-64 -> libstdcxx-ng[version='>=4.9|>=5.4.0|>=7.2.0|>=7.3.0|>=9.3.0']
krb5 -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=9.3.0']
sympy -> python[version='>=3.6,<3.7.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
ptscotch -> mpich[version='>=3.3.2,<4.0.0a0'] -> libstdcxx-ng[version='>=7.3.0|>=9.3.0']
fenics -> fenics-dolfin==2019.1.0=py39hc6fefde_21 -> libstdcxx-ng[version='>=7.3.0|>=9.3.0']
slepc -> suitesparse[version='>=5.6.0,<5.7.0a0'] -> libstdcxx-ng[version='>=7.3.0']
scalapack -> mpich[version='>=3.3,<4.0.0a0'] -> libstdcxx-ng[version='>=7.3.0|>=9.3.0']
suitesparse -> tbb[version='>=2019.1'] -> libstdcxx-ng[version='>=9.3.0']
expat -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=9.3.0']
tbb -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=9.3.0']
pybind11 -> python[version='>=3.6,<3.7.0a0'] -> libstdcxx-ng[version='>=7.2.0']
parmetis -> libstdcxx-ng[version='>=9.3.0']
ipython -> python[version='>=3.9,<3.10.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
gmpy2 -> gmp[version='>=6.1.2'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=7.5.0']
prompt-toolkit -> python[version='>=3.6'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
fenics-ufl -> python[version='>=3.9,<3.10.0a0'] -> libstdcxx-ng[version='>=7.3.0']
cmake -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=9.3.0']
jupyter_client -> python[version='>=3.5'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
ptyprocess -> python -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
spyder-kernels=2.0.1 -> python[version='>=3.6,<3.7.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
gcc_linux-64 -> gcc_impl_linux-64=7.3.0 -> libstdcxx-ng[version='>=4.9|>=5.4.0|>=7.2.0|>=7.3.0|>=9.3.0']
fenics-ffc -> python[version='>=3.9,<3.10.0a0'] -> libstdcxx-ng[version='>=7.3.0']
petsc -> libstdcxx-ng[version='>=9.3.0']
parso -> python[version='>=3.6'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
superlu_dist -> metis[version='>=5.1.0,<5.2.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
eigen -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=9.3.0']
libnghttp2 -> libstdcxx-ng[version='>=7.3.0|>=9.3.0']
fenics-libdolfin -> libstdcxx-ng[version='>=9.3.0']
tornado -> python[version='>=3.6,<3.7.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
wheel -> python -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
icu -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=7.5.0']
fenics-dijitso -> python[version='>=3.9,<3.10.0a0'] -> libstdcxx-ng[version='>=7.3.0']
hypre -> mpich[version='>=3.3,<4.0.0a0'] -> libstdcxx-ng[version='>=9.3.0']
hdf5 -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=9.3.0']
pygments -> python[version='>=3.5'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
numpy -> mkl_fft -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
six -> python[version='>=3.6,<3.7.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
matplotlib -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
fenics-fiat -> python[version='>=3.9,<3.10.0a0'] -> libstdcxx-ng[version='>=7.3.0']
libffi -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=7.5.0']
superlu_dist -> libstdcxx-ng[version='>=9.3.0']
mpi4py -> openmpi[version='>=4.0,<4.1.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=9.3.0']
traitlets -> python[version='>=3.7'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
jedi -> python[version='>=3.9,<3.10.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
ipython_genutils -> python -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
mpmath -> python[version='>=3.8,<3.9.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
jupyter_core -> python[version='>=3.8,<3.9.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
pip -> python[version='>=3.6,<3.7.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
certifi -> python[version='>=3.7,<3.8.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
backcall -> python -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
cloudpickle -> python[version='>=3.5'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
mpich -> libstdcxx-ng[version='>=7.3.0|>=9.3.0']
hypre -> libstdcxx-ng[version='>=7.3.0']
boost-cpp -> libstdcxx-ng[version='>=9.3.0']
mpc -> gmp[version='>=6.1.2'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=7.5.0']
fenics-dolfin -> libstdcxx-ng[version='>=9.3.0']
python-dateutil -> python -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
mpfr -> gmp[version='>=6.1.2'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0|>=7.5.0']
lz4-c -> libstdcxx-ng[version='>=7.3.0|>=9.3.0']
petsc4py -> mpich[version='>=3.3.2,<4.0.0a0'] -> libstdcxx-ng[version='>=7.3.0|>=9.3.0']
libedit -> ncurses[version='>=6.2,<7.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
metis -> libstdcxx-ng[version='>=7.2.0']
slepc4py -> mpich[version='>=3.3.2,<4.0.0a0'] -> libstdcxx-ng[version='>=7.3.0|>=9.3.0']
python_abi -> python=3.9 -> libstdcxx-ng[version='>=7.3.0']
decorator -> python[version='>=3.5'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
python=3.9 -> libstdcxx-ng[version='>=7.3.0']
binutils_linux-64 -> binutils_impl_linux-64=2.33.1 -> libstdcxx-ng[version='>=7.3.0']
sqlite -> ncurses[version='>=6.2,<7.0a0'] -> libstdcxx-ng[version='>=7.3.0']
suitesparse -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
zstd -> libstdcxx-ng[version='>=7.3.0|>=9.3.0']
setuptools -> python[version='>=3.8,<3.9.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
gxx_impl_linux-64 -> gcc_impl_linux-64==7.3.0=habb00fd_1 -> libstdcxx-ng[version='>=4.9|>=5.4.0|>=7.2.0|>=7.3.0|>=9.3.0']
pickleshare -> python[version='>=3'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
pybind11-global -> python[version='>=3.9,<3.10.0a0'] -> libstdcxx-ng[version='>=7.3.0']
slepc -> libstdcxx-ng[version='>=9.3.0']
wurlitzer -> python[version='>=3.8,<3.9.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']

Package numpy conflicts for:
fenics-dolfin -> fenics-dijitso==2019.1.0 -> numpy[version='>=1.19.5,<2.0a0']
matplotlib -> numpy[version='>=1.14.6,<2.0a0']
slepc4py -> numpy[version='>=1.19.5,<2.0a0']
matplotlib -> matplotlib-base[version='>=3.3.4,<3.3.5.0a0'] -> numpy[version='>=1.15.4,<2.0a0|>=1.16.6,<2.0a0']
fenics-libdolfin -> fenics-ffc==2019.1.0 -> numpy
fenics-dijitso -> numpy
fenics-ufl -> numpy
fenics -> fenics-dijitso==2019.1.0=py39hf3d152e_21 -> numpy[version='>=1.19.5']
fenics-ffc -> numpy
fenics-fiat -> numpy
petsc4py -> numpy[version='>=1.19.5,<2.0a0']
fenics-dolfin -> numpy[version='>=1.19.5']

Package python_abi conflicts for:
pip -> setuptools -> python_abi=3.9[build=*_cp39]
pybind11-global -> python_abi=3.9[build=*_cp39]
fenics-fiat -> python_abi=3.9[build=*_cp39]
numpy -> python_abi=3.9[build=*_cp39]
wheel -> setuptools -> python_abi=3.9[build=*_cp39]
setuptools -> python_abi=3.9[build=*_cp39]
slepc4py -> python_abi=3.9[build=*_cp39]
pybind11 -> python_abi=3.9[build=*_cp39]
fenics-dijitso -> python_abi=3.9[build=*_cp39]
fenics -> python_abi=3.9[build=*_cp39]
fenics-dolfin -> python_abi=3.9[build=*_cp39]
ipython -> setuptools[version='>=18.5'] -> python_abi=3.9[build=*_cp39]
gmpy2 -> python_abi=3.9[build=*_cp39]
petsc4py -> python_abi=3.9[build=*_cp39]
mpi4py -> python_abi=3.9[build=*_cp39]
fenics-ufl -> python_abi=3.9[build=*_cp39]
matplotlib -> numpy[version='>=1.14.6,<2.0a0'] -> python_abi=3.9[build=*_cp39]
pygments -> setuptools -> python_abi=3.9[build=*_cp39]
sympy -> python_abi=3.9[build=*_cp39]
fenics-libdolfin -> fenics-ffc==2019.1.0 -> python_abi=3.9[build=*_cp39]
fenics-ffc -> python_abi=3.9[build=*_cp39]

Package ld_impl_linux-64 conflicts for:
petsc4py -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
traitlets -> python[version='>=3.7'] -> ld_impl_linux-64
six -> python[version='>=3.6,<3.7.0a0'] -> ld_impl_linux-64
decorator -> python[version='>=3.5'] -> ld_impl_linux-64
python-dateutil -> python -> ld_impl_linux-64
matplotlib -> python[version='>=3.7,<3.8.0a0'] -> ld_impl_linux-64
fenics-dijitso -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
fenics -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
ipython_genutils -> python -> ld_impl_linux-64
pip -> python[version='>=3.6,<3.7.0a0'] -> ld_impl_linux-64
cloudpickle -> python[version='>=3.5'] -> ld_impl_linux-64
jedi -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
tornado -> python[version='>=3.6,<3.7.0a0'] -> ld_impl_linux-64
jupyter_client -> python[version='>=3.5'] -> ld_impl_linux-64
spyder-kernels=2.0.1 -> python[version='>=3.6,<3.7.0a0'] -> ld_impl_linux-64
binutils_impl_linux-64 -> ld_impl_linux-64[version='2.33.1|2.35.1',build='h53a641e_7|hea4e1c9_2']
gmpy2 -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
numpy -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
ptyprocess -> python -> ld_impl_linux-64
binutils_linux-64 -> binutils_impl_linux-64=2.33.1 -> ld_impl_linux-64[version='2.33.1|2.35.1',build='h53a641e_7|hea4e1c9_2']
mpmath -> python[version='>=3.8,<3.9.0a0'] -> ld_impl_linux-64
backcall -> python -> ld_impl_linux-64
pickleshare -> python[version='>=3'] -> ld_impl_linux-64
mpi4py -> python[version='>=3.7,<3.8.0a0'] -> ld_impl_linux-64
certifi -> python[version='>=3.7,<3.8.0a0'] -> ld_impl_linux-64
pygments -> python[version='>=3.5'] -> ld_impl_linux-64
ipykernel -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
pybind11 -> python[version='>=3.8,<3.9.0a0'] -> ld_impl_linux-64
pyzmq -> python[version='>=3.6,<3.7.0a0'] -> ld_impl_linux-64
gcc_impl_linux-64 -> binutils_impl_linux-64[version='>=2.31.1,<3'] -> ld_impl_linux-64[version='2.33.1|2.35.1',build='h53a641e_7|hea4e1c9_2']
python_abi -> python=3.9 -> ld_impl_linux-64
pybind11-global -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
fenics-fiat -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
parso -> python[version='>=3.6'] -> ld_impl_linux-64
ipython -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
python=3.9 -> ld_impl_linux-64
wurlitzer -> python[version='>=3.8,<3.9.0a0'] -> ld_impl_linux-64
setuptools -> python[version='>=3.8,<3.9.0a0'] -> ld_impl_linux-64
slepc4py -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
prompt-toolkit -> python[version='>=3.6'] -> ld_impl_linux-64
jupyter_core -> python[version='>=3.8,<3.9.0a0'] -> ld_impl_linux-64
fenics-ufl -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
wheel -> python -> ld_impl_linux-64
fenics-ffc -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
fenics-dolfin -> python[version='>=3.9,<3.10.0a0'] -> ld_impl_linux-64
wcwidth -> python -> ld_impl_linux-64
pexpect -> python -> ld_impl_linux-64
sympy -> python[version='>=3.6,<3.7.0a0'] -> ld_impl_linux-64

Package backports conflicts for:
tornado -> ssl_match_hostname -> backports
ipython -> backports.shutil_get_terminal_size -> backports
matplotlib -> backports.functools_lru_cache -> backports

Package libffi conflicts for:
fenics-dolfin -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='>=3.3,<3.4.0a0']
mpi4py -> python[version='>=3.7,<3.8.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
jupyter_client -> python[version='>=3.5'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
pybind11 -> python[version='>=3.8,<3.9.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
wcwidth -> python -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
fenics-ffc -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='>=3.3,<3.4.0a0']
tornado -> python[version='>=3.6,<3.7.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
wheel -> python -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
parso -> python[version='>=3.6'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
fenics-fiat -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='>=3.3,<3.4.0a0']
pickleshare -> python[version='>=3'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
jedi -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
prompt-toolkit -> python[version='>=3.6'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
pygments -> python[version='>=3.5'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
fenics -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='>=3.3,<3.4.0a0']
pyzmq -> python[version='>=3.6,<3.7.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
matplotlib -> python[version='>=3.7,<3.8.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
gmpy2 -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
sympy -> python[version='>=3.6,<3.7.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
traitlets -> python[version='>=3.7'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
jupyter_core -> python[version='>=3.8,<3.9.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
cloudpickle -> python[version='>=3.5'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
fenics-ufl -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='>=3.3,<3.4.0a0']
setuptools -> python[version='>=3.8,<3.9.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
ipython -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
slepc4py -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='>=3.3,<3.4.0a0']
python-dateutil -> python -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
six -> python[version='>=3.6,<3.7.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
pybind11-global -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='>=3.3,<3.4.0a0']
ptyprocess -> python -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
decorator -> python[version='>=3.5'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
fenics-dijitso -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='>=3.3,<3.4.0a0']
mpmath -> python[version='>=3.8,<3.9.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
ipython_genutils -> python -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
numpy -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
pip -> python[version='>=3.6,<3.7.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
wurlitzer -> python[version='>=3.8,<3.9.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
python_abi -> python=3.9 -> libffi[version='>=3.3,<3.4.0a0']
petsc4py -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='>=3.3,<3.4.0a0']
ipykernel -> python[version='>=3.9,<3.10.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
backcall -> python -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
spyder-kernels=2.0.1 -> python[version='>=3.6,<3.7.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
pexpect -> python -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
certifi -> python[version='>=3.7,<3.8.0a0'] -> libffi[version='3.2.*|>=3.2.1,<3.3a0|>=3.3,<3.4.0a0']
python=3.9 -> libffi[version='>=3.3,<3.4.0a0']

Package six conflicts for:
matplotlib -> cycler[version='>=0.10'] -> six[version='>=1.5']

Package tk conflicts for:
matplotlib -> matplotlib-base[version='>=3.3.4,<3.3.5.0a0'] -> tk[version='>=8.6.10,<8.7.0a0']
matplotlib -> tk[version='8.6.*|>=8.6.8,<8.7.0a0|>=8.6.7,<8.7.0a0']

Package liblapack conflicts for:
matplotlib -> numpy[version='>=1.14.6,<2.0a0'] -> liblapack[version='>=3.8.0,<4.0a0']

Package setuptools conflicts for:
matplotlib -> setuptools

Package xz conflicts for:
matplotlib -> python[version='>=3.7,<3.8.0a0'] -> xz[version='>=5.2.3,<6.0a0|>=5.2.4,<6.0a0|>=5.2.5,<6.0a0|>=5.2.5,<5.3.0a0']

Hi Kristin,

Sorry for answering slowly… Taking care of a sick toddler this week.

I thought that this would fix it, but it seems that it didn’t? I have also encountered the matplotlib import error, and

conda activate fenicsproject
conda install matplotlib

fixed it for me. Matplotlib is not installed during conda install fenics, because it seems that the fenics conda package does not list matplotlib as a dependency.

Surprisingly, it seems that this is the case. If you follow the instructions in my Jupyter Notebook removing the --yes option from each conda command, I think you’ll see that matplotlib is not among the list of packages to be installed during the conda install fenics step.

I’m not sure why you get package conflicts when trying to install matplotlib, but one thing you might try is creating a fresh environment and installing matplotlib before fenics, e.g. using

conda create -n fenicsproject python=3.8 matplotlib
conda activate fenicsproject
conda install fenics

Due to my limitations as a mortal being, I’m unable to debug conda package conflicts, but if you send me the output of conda list from your fenicsproject environment (maybe as a personal message, so as not to bore other readers), I can compare package versions with my installation to see if I can figure out where the conflict is.

2 Likes

@conpierce8, With your advice so far, and taking care of a sick toddler, I’d say you are on your way to superhero! At least you are up to a non-enhanced human superhero {Hawkeye/Falcon/Black Widow-level}… (sick 12-year olds aren’t much fun either, but at least you can put them in front of a movie they’ve seen and they will fall asleep, toddlers have a hard time understanding why they don’t feel well, need to sleep, and can’t run around so, :cry:)

My conda list within (fenicsproject) does indeed show that the package has left out matplotlib, so I went ahead and uninstalled it from Anaconda, reinstalled with setting the package source and the spyder-kernels… and now it is in the list. Yay!

To summarize the fix and be able to mark this as solved, in Terminal (base) I ran:

conda remove -n fenicsproject --all
# password & y to Proceed, since I didn't use --yes
conda create -n fenicsproject python=3.8 matplotlib
# y to Proceed
conda activate fenicsproject
conda config --append channels conda-forge
conda install --yes fenics
conda install --yes spyder-kernels=2.0.1
conda activate base
spyder

I made sure the “Tools → Preferences → Python Interpreter → (Radio Button) Use the following Python interpreter:” was set to /home/kristin/anaconda3/envs/fenicsproject/bin/python

Then I ran the demo code and voila, not only does the FE code run (which it did before) but now it plots (which it was complaining about no matplotlib module)!

Thanks for sticking with me on this! I couldn’t upload directly to the Github, so if the copy-paste job I did for the update seems off, please feel free to edit it further. This was my first collaboration and my html markup capability isn’t stellar.

2 Likes

Hi

I followed this thread on

platform: MacOS Monterey version 12.6 (M2 Macbook Pro)

and was hit with the following import error

> Python 3.8.13 (default, Mar 28 2022, 06:16:26)
> Type "copyright", "credits" or "license" for more information.
> 
> IPython 8.4.0 -- An enhanced Interactive Python.
> 
> runfile('/Users/jt/Documents/FEniCS/Ex1-Poisson/demo_poisson.py', wdir='/Users/jt/Documents/FEniCS/Ex1-Poisson')
> Traceback (most recent call last):
> 
>   File ~/Documents/FEniCS/Ex1-Poisson/demo_poisson.py:14 in <module>
>     import fenics as fe
> 
>   File /opt/anaconda3/envs/fenicsproject/lib/python3.8/site-packages/fenics/__init__.py:7 in <module>
>     from dolfin import *
> 
>   File /opt/anaconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/__init__.py:34 in <module>
>     from .cpp import __version__
> 
> ImportError: dlopen(/opt/anaconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/cpp.cpython-38-darwin.so, 0x0002): Library not loaded: '@rpath/libopenblas.dylib'
>   Referenced from: '/opt/anaconda3/envs/fenicsproject/lib/libumfpack.5.7.9.dylib'
>   Reason: tried: '/opt/anaconda3/envs/fenicsproject/lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/../../../libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/../../../libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/bin/../lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/bin/../lib/libopenblas.dylib' (no such file), '/usr/local/lib/libopenblas.dylib' (no such file), '/usr/lib/libopenblas.dylib' (no such file)Library not loaded: '@rpath/libopenblas.dylib'
>   Referenced from: '/opt/anaconda3/envs/fenicsproject/lib/libcholmod.3.0.14.dylib'
>   Reason: tried: '/opt/anaconda3/envs/fenicsproject/lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/../../../libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/python3.8/site-packages/dolfin/../../../libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/bin/../lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/lib/libopenblas.dylib' (no such file), '/opt/anaconda3/envs/fenicsproject/bin/../lib/libopenblas.dylib' (no such file), '/usr/local/lib/libopenblas.dylib' (no such file), '/usr/lib/libopenblas.dylib' (no such file)

Any suggestions?

PS: It worked on my Ubuntu but is giving me this error specifically on macOS.