firedrakeproject / firedrake

Firedrake is an automated system for the portable solution of partial differential equations using the finite element method (FEM)
https://firedrakeproject.org
Other
496 stars 157 forks source link

Testing the installation Failed #1700

Closed fred-valentin closed 4 years ago

fred-valentin commented 4 years ago

(firedrake) (base) tramontane:soft-orig valentin$ source firedrake/bin/activate (firedrake) (base) tramontane:soft-orig valentin$ cd firedrake/src/firedrake (firedrake) (base) tramontane:firedrake valentin$ make alltest Building extension modules Traceback (most recent call last): File "setup.py", line 8, in import numpy as np ModuleNotFoundError: No module named 'numpy' Linting firedrake codebase /Users/valentin/soft-orig/firedrake/bin/python: No module named flake8 make: *** [lint] Error 1

Hi, I tested the firedrake installation and I got the issue above. Could you help me? Thanks

dham commented 4 years ago

It looks like your firedrake install did not succeed. Please post firedrake-install.log, which will be in the directory where you ran firedrake-install.

fred-valentin commented 4 years ago

firedrake-install.log

fred-valentin commented 4 years ago

Here it is. Thanks!

dham commented 4 years ago

It looks like your install was interrupted when installing PETSc. It definitely did not run to finish. Probably the easiest thing to do is delete the Firedrake directory and install again. This looks most like something happened on your machine at 23:49. If it fails again at the same point then we'll have to investigate more deeply.

fred-valentin commented 4 years ago

firedrake-install.log Hi, I did what you indicated, and I think I stuck at the same point. Here is the new log file. Thanks a lot for your help.

dham commented 4 years ago

Hmmm. OK. The line that your script appears to be failing on is the eigen download. Does this work for you, in the sense of executing and actually resulting in eigen being downloaded:

import urllib.request
urllib.request.urlretrieve("https://github.com/eigenteam/eigen-git-mirror/archive/3.3.3.tar.gz", "eigen-3.3.3.tgz")

Apologies for taking a while to get back each time. Coronavirus lack of childcare means that I am only working about half the time at the moment.

fred-valentin commented 4 years ago

Hi, thanks for your answer. I understand very well; I am in the same situation here.

I did

https://github.com/eigenteam/eigen-git-mirror/archive/3.3.3.tar.gz

"by hand", and it worked nicely. i.e., I got it. Maybe I forgot to mention that I am installing firedrake in a MacBook here, just in case this information can help... thanks.

dham commented 4 years ago

OK. Which python are you using to run the installer? I can see from your PATH that you seem to have anaconda, plus an explicit reference to a Python 3.8. We recommend people use the current Python from homebrew (/usr/local/bin/python3 firedrake-install) though users have successfully installed firedrake using anaconda. Perhaps try running the install script with homebrew python?

fred-valentin commented 4 years ago

Ok, I will try it.

fred-valentin commented 4 years ago

Hello, it has compiled! and firedrake is installed, many thanks. Now, I am at the point where the "alltest" has not passed. I got the following (final) message:

============================================================================================= short test summary info ============================================================================================= ERROR - _pytest.config.ConftestImportFailure: (local('/Users/valentin/soft-orig/firedrake/src/firedrake/tests/extrusion/conftest.py'), (<class 'TypeError'>, TypeError("'NoneType' object is not subscriptable"... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ================================================================================================ 1 error in 14.99s ================================================================================================ make: *** [test] Error 2

fred-valentin commented 4 years ago

I can send you the full error message if it is important... (a bit long)

fred-valentin commented 4 years ago

Please see below the full error message. Thanks again:

=============================================================================================== test session starts =============================================================================================== platform darwin -- Python 3.7.7, pytest-5.4.2, py-1.8.1, pluggy-0.13.1 rootdir: /Users/valentin/soft-orig/firedrake/src/firedrake, inifile: setup.cfg plugins: forked-1.1.3, xdist-1.32.0 collected 0 items / 1 error

===================================================================================================== ERRORS ====================================================================================================== __ ERROR collecting test session __ ../../lib/python3.7/site-packages/_pytest/config/init.py:495: in _importconftest return self._conftestpath2mod[key] E KeyError: PosixPath('/Users/valentin/soft-orig/firedrake/src/firedrake/tests/extrusion/conftest.py')

During handling of the above exception, another exception occurred: ../../lib/python3.7/site-packages/_pytest/config/init.py:501: in _importconftest mod = conftestpath.pyimport() ../../lib/python3.7/site-packages/py/_path/local.py:701: in pyimport import(modname)

:983: in _find_and_load ??? :967: in _find_and_load_unlocked ??? :677: in _load_unlocked ??? ../../lib/python3.7/site-packages/_pytest/assertion/rewrite.py:152: in exec_module exec(co, module.__dict__) tests/extrusion/conftest.py:2: in from firedrake import ExtrudedMesh, UnitSquareMesh, UnitIntervalMesh firedrake/__init__.py:66: in from firedrake.output import * firedrake/output.py:12: in from .paraview_reordering import vtk_lagrange_tet_reorder,\ firedrake/paraview_reordering.py:12: in vtkSoLoc = importlib.util.find_spec("vtk").submodule_search_locations[0] E TypeError: 'NoneType' object is not subscriptable During handling of the above exception, another exception occurred: ../../lib/python3.7/site-packages/py/_path/common.py:383: in visit for x in Visitor(fil, rec, ignore, bf, sort).gen(self): ../../lib/python3.7/site-packages/py/_path/common.py:424: in gen dirs = self.optsort([p for p in entries ../../lib/python3.7/site-packages/py/_path/common.py:425: in if p.check(dir=1) and (rec is None or rec(p))]) ../../lib/python3.7/site-packages/_pytest/nodes.py:506: in _recurse ihook = self._gethookproxy(dirpath) ../../lib/python3.7/site-packages/_pytest/nodes.py:487: in _gethookproxy my_conftestmodules = pm._getconftestmodules(fspath) ../../lib/python3.7/site-packages/_pytest/config/__init__.py:473: in _getconftestmodules mod = self._importconftest(conftestpath) ../../lib/python3.7/site-packages/_pytest/config/__init__.py:509: in _importconftest raise ConftestImportFailure(conftestpath, sys.exc_info()) E _pytest.config.ConftestImportFailure: (local('/Users/valentin/soft-orig/firedrake/src/firedrake/tests/extrusion/conftest.py'), (, TypeError("'NoneType' object is not subscriptable"), )) ============================================================================================= short test summary info ============================================================================================= ERROR - _pytest.config.ConftestImportFailure: (local('/Users/valentin/soft-orig/firedrake/src/firedrake/tests/extrusion/conftest.py'), (, TypeError("'NoneType' object is not subscriptable"... !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ================================================================================================ 1 error in 14.99s ================================================================================================ make: *** [test] Error 2
dham commented 4 years ago

Looks like a problem with vtk (visualisation toolkit - we use it for outputting solution fields for later visualisation). With the firedrake venv active, can you try running python and import firedrake. If that fails, try running python and import vtk. In either case, please post the new firedrake-install.log.

fred-valentin commented 4 years ago

Hi, here is the file log. Thanks firedrake-install.log

fred-valentin commented 4 years ago

I run python and "import firedrake" (ok) and "import vtk" (bad). Please see if it is what you meant:

(firedrake) (base) tramontane:soft-orig valentin$ /usr/local/bin/python3 Python 3.7.7 (default, Mar 10 2020, 15:43:33) [Clang 11.0.0 (clang-1100.0.33.17)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import firedrake import vtk Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'vtk'

fred-valentin commented 4 years ago

Instead of using /usr/local/bin/python3, I used python3. This is what I got:

python3 Python 3.7.7 (default, Mar 10 2020, 15:43:33) [Clang 11.0.0 (clang-1100.0.33.17)] on darwin Type "help", "copyright", "credits" or "license" for more information.

inport vtk File "", line 1 inport vtk ^ SyntaxError: invalid syntax import firedrake Traceback (most recent call last): File "", line 1, in File "/Users/valentin/soft-orig/firedrake/src/firedrake/firedrake/init.py", line 66, in from firedrake.output import * File "/Users/valentin/soft-orig/firedrake/src/firedrake/firedrake/output.py", line 12, in from .paraview_reordering import vtk_lagrange_tet_reorder,\ File "/Users/valentin/soft-orig/firedrake/src/firedrake/firedrake/paraview_reordering.py", line 12, in vtkSoLoc = importlib.util.find_spec("vtk").submodule_search_locations[0] TypeError: 'NoneType' object is not subscriptable

Doing which python3, I got

/Users/valentin/soft-orig/firedrake/bin/python3

dham commented 4 years ago

I suspect that this issue is that vtk have upgraded while the python bindings have not, or similar. One of my colleagues merged what I think is probably a patch for this issue a few hours ago as #1702. Try downloading a fresh install script and installing anew and this might just have gone away. Sorry for the inconvenience.

wence- commented 4 years ago

I think you can probably get away with pip uninstall vtk followed by pip install vtk==8.1.2

fred-valentin commented 4 years ago

Hi, ok I will try it. Thanks

fred-valentin commented 4 years ago

Hello, I have gone through all the tests and got the following message at the end of the process

Is that ok? Thanks!

wence- commented 4 years ago

That looks like everything is working.

fred-valentin commented 4 years ago

Perfect. I doubted due to the 31 skipped and the 2 warnings message. Many thanks!