dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #20802
Re: [Question #141422]: [Question #141422]:[Question #141422]:[Question#141422]: [Question#141422]:[Question #141422]:[Question #141422]:DOLFIN/FEniCS integrationin otherPythoninstallation
Question #141422 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/141422
Status: Answered => Open
Till B is still having a problem:
Yes, I already tried this, environment variables are set like you described.
In fact I reinstalled the whole Python(x,y) into the Fenics installation.
But when I try to compile the biharmonics demo.py, I get the error below, no
matter if it is from Spyder or the cmd shell. It does work if I run the
Fenics runme.bat first.
Traceback (most recent call last):
File "C:\FEniCS\share\dolfin\demo\pde\biharmonic\python\demo.py", line 24,
in <module>
from dolfin import *
File "C:\FEniCS\lib\site-packages\dolfin\__init__.py", line 11, in
<module>
import dolfin.cpp as cpp
File "C:\FEniCS\lib\site-packages\dolfin\cpp.py", line 28, in <module>
_cpp = swig_import_helper()
File "C:\FEniCS\lib\site-packages\dolfin\cpp.py", line 24, in
swig_import_helper
_mod = imp.load_module('_cpp', fp, pathname, description)
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
(last line means that the called module was not found)
I tried to mimic the runme.bat and I guess the tricky part is
if not defined HOME (
if defined HOMEDRIVE (
if defined HOMEPATH (
set HOME=%HOMEDRIVE%%HOMEPATH%
)
) else (
if defined USERPROFILE (
set HOME=%USERPROFILE%
)
)
)
if not defined HOME (
for /f "tokens=*" %%a in (
'python -c "import os;print os.path.expanduser('~')"'
) do (
set HOME=%%a
)
)
if not exist "%HOME%\pydistutils.cfg" (
echo [build] > "%HOME%\pydistutils.cfg"
echo compiler=mingw32 >> "%HOME%\pydistutils.cfg"
)
What is it doing here? Can I somehow include this into Spyder or the other
Python(x,y) stuff?
2011/1/19 Johannes Ring <question141422@xxxxxxxxxxxxxxxxxxxxx>
> Your question #141422 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/141422
>
> Johannes Ring posted a new comment:
> Oh, I didn't even notice that in the Armadillo README.txt. CMake and
> Armadillo works just fine for me on Windows using the MinGW compilers.
>
> It is lots of information available on how to set environment variables
> in Windows (http://tinyurl.com/6ajpfsp). What I did was to edit the PATH
> variable under user variables and added the following before the rest of
> the value:
>
> C:\FEniCS\bin;C:\FEniCS\Scripts;C:\FEniCS\lib;
>
> You should replace C:\FEniCS with whatever directory you installed
> FEniCS into. Then I created the following new variables (also under user
> variables):
>
> PKG_CONFIG_PATH=C:\FEniCS\lib\pkg-config
> PYTHONPATH=C:\FEniCS\lib\site-packages;C:\FEniCS\lib\vtk-5.6
> BOOST_DIR=C:\FEniCS
> SWIG_LIB=C:\FEniCS\share\swig\2.0.0
>
> After that I simply closed all open Python(x,y) related program and then
> I was able to use DOLFIN from Spyder.
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.