← Back to team overview

dolfin team mailing list archive

Re: Dolfin import error

 

In cygwin, it seems that the main Lib is in /lib (where python2.5\site-packages can be found).
So, I changed the configuration commnad to the following to force it to be installed in /lib:

$ ./configure --enable-petsc --with-petsc-dir=/home/rfarahi/math/petsc-2.3.3-p11 --enable-pydolfin --prefix=/.

But, the result is exactly the same. 

The contents of dolfin.conf is now as follows:
export PATH="/./bin:$PATH"
export LD_LIBRARY_PATH="/./lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/./lib/pkgconfig:$PKG_CONFIG_PATH"
export PYTHONPATH="/./lib/python2.5/site-packages:$PYTHONPATH"

Another point is that there is no setup.py in the src/pydolfin directory. However, the dolfin files (assemble.py, _dolfin.a, etc) have been created in the /lib/python2.5/site-packages/dolfin

The error: No module named _dolfin

Reza


----- Original Message ----
From: Ilmar Wilbers <ilmarw@xxxxxxxxx>
To: dolfin-dev@xxxxxxxxxx
Sent: Tuesday, April 8, 2008 11:49:18 AM
Subject: Re: [DOLFIN-dev] Dolfin import error

Reza Farrahi Moghaddam wrote:
> Hi all,
>  
> I am trying to install dolfin on a cygwin enviroment. After 
> installation, I received the following error when testing the Poisson 
> demo:
>  
> rfarahi@SM-ETS-DEV10 <mailto:rfarahi@SM-ETS-DEV10> 
> ~/math/dolfin-0.7.2/src/demo/pde/poisson/python
> $ python demo.py
> Traceback (most recent call last):
>  File "demo.py", line 20, in <module>
>    from dolfin import *
>  File "/usr/local/lib/python2.5/site-packages/dolfin/__init__.py", 
> line 4, in <module>
>    from assemble import *
>  File "/usr/local/lib/python2.5/site-packages/dolfin/assemble.py", 
> line 17, in <module>
>    from dolfin import *
>  File "/usr/local/lib/python2.5/site-packages/dolfin/dolfin.py", line 
> 7, in <module>
>    import _dolfin
> ImportError: No module named _dolfin
>  
> There is a problem with _dolfin. I searched for it, and it is 
> presented in the python2.5\site-packages\dolfin in a form of _dolfin.a 
> and _dolfin.la
>  
> The env variables are also presented at the end of this email.
>  
> Is it a library path error?
> I would be grateful for any suggestion.
>  
> Best regards,
> Reza Farrahi Moghaddam
>  
> P.S. env variables
>
> MANPATH=/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man:/usr/share/qt3/doc/man:/usr/X11R6/man
>
> TERM=cygwin
>
> PROCESSOR_IDENTIFIER=x86 Family 15 Model 67 Stepping 3, AuthenticAMD
>
> WINDIR=C:\WINDOWS
>
> KMP_DUPLICATE_LIB_OK=TRUE
>
> TEXDOCVIEW_txt=cygstart %s
>
> TEXDOCVIEW_dvi=cygstart %s
>
> GS_LIB=C:\gstools\gs8.57\bin\gsdll32.lib
>
> QTDIR=/usr/lib/qt3
>
> OLDPWD=/home/rfarahi/math/dolfin-0.7.2/src/demo/pde/poisson
>
> OS=Windows_NT
>
> USER=rfarahi
>
> JRE_HOME=C:\Program Files\Java\jdk1.6.0_05
>
> TEMP=/cygdrive/c/DOCUME~1/rfarahi/LOCALS~1/Temp
>
> COMMONPROGRAMFILES=C:\Program Files\Common Files
>
> USERNAME=rfarahi
>
> GS_PROG=C:\gstools\gs8.57\bin\gswin32c.exe
>
> TEXDOCVIEW_pdf=cygstart %s
>
> PROCESSOR_LEVEL=15
>
> PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/MiKTeX/miktex/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program 
> Files/ATI Technologies/ATI.ACE/:/cygdrive/c/Program Files/Common 
> Files/Roxio Shared/DLLShared/:/cygdrive/c/Program Files/Microsoft SQL 
> Server/90/Tools/binn/:/cygdrive/c/Program 
> Files/MATLAB/R2007b/bin:/cygdrive/c/Program 
> Files/MATLAB/R2007b/bin/win32:/cygdrive/c/Program Files/ParaView 
> 3.2.1/bin:/cygdrive/c/Program Files/SSH Communications Security/SSH 
> Secure Shell: C:/cygwin/bin: C:/cygwin/usr/local/bin: 
> C:/cygwin/usr/X11R6/bin:/usr/lib/lapack
>
> FP_NO_HOST_CHECK=NO
>
> PWD=/home/rfarahi/math/dolfin-0.7.2/src/demo/pde/poisson/python
>
> SYSTEMDRIVE=C:
>
> TEXDOCVIEW_html=cygstart %s
>
> QMAKESPEC=/usr/lib/qt3/mkspecs/cygwin-g++
>
> PROCESSOR_ARCHITECTURE=x86
>
> !C:=C:\cygwin\bin
>
> SHLVL=1
>
> HOME=/home/rfarahi
>
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
>
> HOMEDRIVE=C:
>
> PROMPT=$P$G
>
> TMP=/cygdrive/c/DOCUME~1/rfarahi/LOCALS~1/Temp
>
> MKL_SERIAL=YES
>
> CVS_RSH=/bin/ssh
>
> PROCESSOR_REVISION=4303
>
> PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig
>
> TEXDOCVIEW_ps=cygstart %s
>
> MAKE_MODE=unix
>
> INFOPATH=/usr/local/info:/usr/share/info:/usr/info:
>
> PROGRAMFILES=C:\Program Files
>
> NUMBER_OF_PROCESSORS=2
>
> SESSIONNAME=Console
>
> _=/usr/bin/env
>
>  
>  
>
Hello,

I am not very familiar with cygwin, but did you set the environment 
variables defined in the file dolfin.conf in the main dolfin directory?

ilmar
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev


      __________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/