Trying to install MOOSE

128 views
Skip to first unread message

Jordan Argyle

unread,
Apr 9, 2018, 4:10:44 PM4/9/18
to moose-users
Following the instructions online (mooseframework.org/wiki/BasicManualInstallation/Linux), I have successfully installed and compiled everything. But when I go to run the tests, I get the following error:
File "./run_tests", line 7, in <module>
   from TestHarness import TestHarness
File ".../moose/python/TestHarness/__init__.py", line 10, in <module>
   from TestHarness import TestHarness
File ".../moose/python/TestHarness/TestHarness.py", line 543
   print 'Your session file is %s' % self.options.session_file
                                            ^
SyntaxError: Missing parenthesis in call to 'print'. Did you mean print(print 'Your session file is %s' % self.options.session_file)?

The only indications of a potential problem I got was:
  1. When configuring the make stuff for PETSc, I was told that python doesn't support configure, so I had to run python2 './configure'... for PETSc.
  2. When verifying PETSc (the make command with "PATSC_ARCH= streams" at the end), I was told that matplotlib could not be opened to plot things, even though I have python with matplotlib
  3. When trying to make in .../moose/test, I was informed that python could not be found. After finding in this group that I needed to install python-dev, the make finished fine.

When I installed MOOSE the day before using your pre-built environment, everything built and tested fine. I'm now trying to build my own environment because I have an Anaconda install on my box, and don't want the miniconda from your pre-built environment. How can I fix this error? How can I link MOOSE to my Anaconda python install so MOOSE can see it?

Jordan Argyle

unread,
Apr 9, 2018, 4:24:26 PM4/9/18
to moose-users
To answer my own question: MOOSE requires Python 2.7. So, to help anybody trying to do the same thing:
  1. Add a conda environment for python2 (named python2. You can change it to "-n moose" if you want):
    conda create -m -n python2 anaconda python=2.7
  2. Switch to the new environment:
    source activate python2
  3. Everything runs swimmingly from here. Good work.

Cody Permann

unread,
Apr 10, 2018, 4:55:41 PM4/10/18
to moose...@googlegroups.com
Jordan,

Thanks for posting this back on the list. We just merged in a change that will print a better error if you attempt to run the tests with Python3. We do plan to support both version of python, but we'll have to maintain backwards compatibility for some time (to support RHEL cluster systems or other environments that haven't moved to Python3). 

Cody

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/da1a15bf-9282-41f9-8c00-df8a7ca2aa14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

eDgar

unread,
Apr 10, 2018, 4:57:33 PM4/10/18
to moose-users
I was able to do a virtualenv with python 2.7 in the past. I don't know if that still works too.
Reply all
Reply to author
Forward
0 new messages