Help needed: ImportError: No module named anytree

1,455 views
Skip to first unread message

Vitaliy

unread,
Feb 22, 2018, 9:23:17 AM2/22/18
to moose-users
Hello,
I have just updated MOOSE and I got this error message while running the tests. The installation and compilation went smooth and successful no errors or warnings, but tests do not work. But the actual problem works, only test run does not work.

Traceback (most recent call last):
  File "./run_tests", line 7, in <module>
    from TestHarness import TestHarness
  File "/home/project/moose/python/TestHarness/__init__.py", line 10, in <module>
    from TestHarness import TestHarness
  File "/home/project/moose/python/TestHarness/TestHarness.py", line 22, in <module>
    import util
  File "/home/project/moose/python/TestHarness/util.py", line 12, in <module>
    from mooseutils import colorText
  File "/home/project/moose/python/mooseutils/__init__.py", line 13, in <module>
    from hit_load import hit_load, HitNode, hit_parse
  File "/home/project/moose/python/mooseutils/hit_load.py", line 3, in <module>
    import anytree
ImportError: No module named anytime

Thanks,
Vitaliy

Miller, Jason M

unread,
Feb 22, 2018, 9:34:38 AM2/22/18
to moose...@googlegroups.com
The 'anytree' module is include in the latest moose-environment packages. Its possible you are using something non-standard? Specifically, anytree is available when one loads our miniconda or moose-tools module.

Jason


--
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+unsubscribe@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/081d423a-4076-454e-9147-c2ca7a073f74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vitaliy

unread,
Feb 22, 2018, 9:43:41 AM2/22/18
to moose-users
this is that I was thinking on the first place. I reinstalled moose environment package for Linux cluster single user, but the same error appeared again. echo $PETSC_DIR returns the correct path (/home/moose-compilers/petsc/petsc-3.8.3/gcc-opt). Again, my actual problem works, even tests work if I run it separately, only ./run_test command does not. Also, the output file is not store at the location of the input file, but in the root directory. How do I load MOOSE modules on linux cluster, because module load does not return anything.

Thanks,
Vitaliy 



On Thursday, February 22, 2018 at 8:34:38 AM UTC-6, jason.miller wrote:
The 'anytree' module is include in the latest moose-environment packages. Its possible you are using something non-standard? Specifically, anytree is available when one loads our miniconda or moose-tools module.

Jason

On Thu, Feb 22, 2018 at 7:23 AM, Vitaliy <vityu...@gmail.com> wrote:
Hello,
I have just updated MOOSE and I got this error message while running the tests. The installation and compilation went smooth and successful no errors or warnings, but tests do not work. But the actual problem works, only test run does not work.

Traceback (most recent call last):
  File "./run_tests", line 7, in <module>
    from TestHarness import TestHarness
  File "/home/project/moose/python/TestHarness/__init__.py", line 10, in <module>
    from TestHarness import TestHarness
  File "/home/project/moose/python/TestHarness/TestHarness.py", line 22, in <module>
    import util
  File "/home/project/moose/python/TestHarness/util.py", line 12, in <module>
    from mooseutils import colorText
  File "/home/project/moose/python/mooseutils/__init__.py", line 13, in <module>
    from hit_load import hit_load, HitNode, hit_parse
  File "/home/project/moose/python/mooseutils/hit_load.py", line 3, in <module>
    import anytree
ImportError: No module named anytime

Thanks,
Vitaliy

--
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.

Miller, Jason M

unread,
Feb 22, 2018, 10:33:53 AM2/22/18
to moose...@googlegroups.com
Oh I see... since this is a non-moose-environment install... looks like we need to update our cluster single/multi user installation instructions, to reflect the new requirements to python. Not sure you will need all of the following python modules, but here is a list the MOOSE group expects to have available (because they use the moose-environment package)

<install miniconda, or leverage your operating system's package management system, to install the following>

  python modules: coverage reportlab mako numpy scipy scikit-learn h5py hdf5 scikit-image requests vtk=7.1.0 pyyaml matplotlib pip lxml pyflakes pandas conda-build mock yaml pyqt swig

And also, the PIP specific stuff (pip install):

  markdown python-markdown-math pybtex bs4 jinja2 livereload daemonlite pylint==1.6.5 lxml pylatexenc anytree


The _exact_ thing we are doing to supply the above in the moose-environment package:

...install miniconda, and with miniconda installed:

  conda install -c idaholab python=2.7 coverage reportlab mako numpy scipy scikit-learn h5py hdf5 scikit-image requests vtk=7.1.0 pyyaml matplotlib pip lxml pyflakes pandas conda-build mock yaml pyqt swig --yes

...install pip, and with pip install:

  pip install --no-cache-dir markdown python-markdown-math pybtex bs4 jinja2 livereload daemonlite pylint==1.6.5 lxml pylatexenc anytree


Looks like you may only need to perform `pip install anytree`. But, there is no telling what other python modules you might need, so what I'd do, is make sure all those modules are installed.

Jason


To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.

Slaughter, Andrew E

unread,
Feb 22, 2018, 11:37:36 AM2/22/18
to moose...@googlegroups.com
This is bug that we introduced recently, the test system should not be relying on "anytree". I will get this fixed soon(ish).

Vitaliy

unread,
Feb 22, 2018, 1:35:16 PM2/22/18
to moose-users
thanks guys! I have installed the missing packages and everything works now

Ran 560 tests in 29.3 seconds
560 passed, 41 skipped, 0 pending,


Vitaliy

--
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.
Reply all
Reply to author
Forward
0 new messages