building docs fails for dev-branch

Asked by kassbohm

I pulled the dev-branch of dolfin via bzr branch lp:dolfin

To build api-documentation etc., I read in the source-dir ../dolfin/doc/README

---
1. Build DOLFIN
2. Make sure that the corresponding dolfin and dolfin_utils modules
   are available
3. Run
       make doc
   in the build directory.
---

So after installation and adjusting PYTHONPATH, i do in the build-dir ../build/doc

#make doc and get the following error:
...
Generating documentation for parameter ...
Generating documentation for math ...
Traceback (most recent call last):
  File "generate_api_doc.py", line 75, in <module>
    generate_dolfin_doc(args[0], args[1], args[2])
  File "generate_api_doc.py", line 58, in generate_dolfin_doc
    raise ImportError(dolfin_import_error_msg % (module_name, what))
ImportError:
Unable to import the dolfin module
Error: No module named ufl
Did you forget to update your PYTHONPATH variable?
-----

But no - I did not forget to update the variable! I did update it and I checked that with:
1) doing source xxx/share/dolfin/dolfin.conf on the command line and also
2) entering python with import dolfin and import dolfin_utils.

Any idea?

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Marie Rognes
Solved:
Last query:
Last reply:
Revision history for this message
Best Marie Rognes (meg-simula) said :
#1

On 06/23/11 21:16, Sven Kaßbohm wrote:
> New question #162521 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/162521
>
> I pulled the dev-branch of dolfin via bzr branch lp:dolfin
>
> To build api-documentation etc., I read in the source-dir ../dolfin/doc/README
>
> ---
> 1. Build DOLFIN
> 2. Make sure that the corresponding dolfin and dolfin_utils modules
> are available
> 3. Run
> make doc
> in the build directory.
> ---
>
> So after installation and adjusting PYTHONPATH, i do in the build-dir ../build/doc
>
> #make doc and get the following error:
> ...
> Generating documentation for parameter ...
> Generating documentation for math ...
> Traceback (most recent call last):
> File "generate_api_doc.py", line 75, in<module>
> generate_dolfin_doc(args[0], args[1], args[2])
> File "generate_api_doc.py", line 58, in generate_dolfin_doc
> raise ImportError(dolfin_import_error_msg % (module_name, what))
> ImportError:
> Unable to import the dolfin module
> Error: No module named ufl
> Did you forget to update your PYTHONPATH variable?
> -----
>
> But no - I did not forget to update the variable! I did update it and I checked that with:
> 1) doing source xxx/share/dolfin/dolfin.conf on the command line and also
> 2) entering python with import dolfin and import dolfin_utils.
>
> Any idea?
>
>
>

It works for me... Are you absolutely sure that you have UFL and that
"import dolfin" in Python does not complain about not finding it?

--
Marie

Revision history for this message
kassbohm (kassbohm) said :
#2

Hello Marie.

I am sure about that when I do import dolfin or ufl (from within Python
2.6) I get no errors.

But I do get the above error message.

I am doing the "make doc" in the build-directory, the directory in which I did make and make install. However, the advice about how to make doc is in the source-directory.

And the (strange) error message is:
ImportError:
Unable to import the dolfin module
Error: No module named ufl

Revision history for this message
kassbohm (kassbohm) said :
#3

My sentences are unclear. What I meant to say:

1) Importing dolfin/ufl/dolfin_utils is fine under python 2.6...

2) "make doc" from within the build-dir of dolfin (dolfin only) fails with the (strange) error message:
ImportError:
Unable to import the dolfin module
Error: No module named ufl

Revision history for this message
kassbohm (kassbohm) said :
#4

The problem seems to be, that the doc installation wants to import the modules for python2.7.

But I installed them for python2.6.

Now I also installed them also for python2.7 - which fixed the problem.

Revision history for this message
kassbohm (kassbohm) said :
#5

Thanks Marie Rognes, that solved my question.