I’ve been working on a project using the fenics virtual environment for a while, but unfortunately, my old MacBook got fried and I needed to reinstall it on a new MacBook. After doing so, when I tried to run my python scripts in the fenics environment, I got a pop-up notification that I needed to install an additional C/C++ compiler to run them. So, I installed that, and now I’ve been getting the following error when I try to run my code:
RuntimeError: In instant.recompile: The module did not compile with command 'make VERBOSE=1'
Can anyone tell me how I can fix this, or why it’s not working? I think I’m working with an older version of fencis that’s only compatible only with python 2.7, so that’s the interpreter I have configured in my IDE (PyCharm). Someone told me this is the reason I was asked to download the additional compiler, but I’m not sure… I appreciate any help or advice, thank you!
This is not really an answer to your question, but have you considered using docker?
With docker I think you can get away with installation problem quite easily.
On MacOS, fenics is available via conda (Anaconda). It might be easier to use than docker.
Hi, I used conda to install it on the new MacBook so it’s already using Anaconda I think. But I’m still continuously getting this error.
Does it work from the command line, from the shell provided with conda, or is it only a problem with PyCharm? Getting it to work with PyCharm is a different problem from getting it to work at all.
So, this might have led to another issue… maybe I just installed python wrong, or even not at all. Because when I open my MacOS terminal and after I activate fenics, I type
ipython to join an interactive python session, which is how I run my scripts from the terminals, and I get the error
zsh: command not found: ipython
So does this mean I don’t even have python installed on my machine?
It means you don’t have ipython installed. Install it, or try to access the python shell as
All the same, if anaconda is installed then I think it will provide its own python shell to launch (rather than opening via the MacOS terminal). That’s how it is with Windows anyway, I have less experience with MacOS.
Hi, so I actually do have ipython installed. I removed the fenics environment and I can re-install it but I’m not sure how I can do that.
You’d want both ipython and fenics installed within the same conda environment.