- Thank you received: 0
SOLVED: ngsxfem installation ubuntu 16.4
7 years 1 month ago - 7 years 1 week ago #205
by Karatza
SOLVED: ngsxfem installation ubuntu 16.4 was created by Karatza
Hi, I made the installation (ubuntu 16.4) without any mistake for both packages ngsolve and ngsxfem. ngsove works perfectly but related to the ngsxfem the 17/18 of the preliminary tests fail and when I am trying to execute files of the ngsxfem py_tutorials e.g. the cutfem.py, I see the message
" File "<string>", line 75, in <module>
ImportError: No module named 'xfem'"
and in particular:
ubunt164@ubunt164-VirtualBox:~$ netgen
NETGEN-6.2-dev
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
optfile ./ng.opt does not exist - using default values
togl-version : 2
OCC module loaded
loading ngsolve library
NGSolve-6.2.1709
Using Lapack
Including sparse direct solver Pardiso
Including sparse direct solver UMFPACK
Running parallel using 1 thread(s)
importing NGSolve-6.2.1709
(should) load python file '/home/ubunt164/ngsxfem/py_tutorials/cutfem.py'
Traceback (most recent call last):
File "<string>", line 75, in <module>
ImportError: No module named 'xfem'
Finished executing /home/ubunt164/ngsxfem/py_tutorials/cutfem.py
Thank you for using NGSolve
could you help me please? Thank you!
" File "<string>", line 75, in <module>
ImportError: No module named 'xfem'"
and in particular:
ubunt164@ubunt164-VirtualBox:~$ netgen
NETGEN-6.2-dev
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
optfile ./ng.opt does not exist - using default values
togl-version : 2
OCC module loaded
loading ngsolve library
NGSolve-6.2.1709
Using Lapack
Including sparse direct solver Pardiso
Including sparse direct solver UMFPACK
Running parallel using 1 thread(s)
importing NGSolve-6.2.1709
(should) load python file '/home/ubunt164/ngsxfem/py_tutorials/cutfem.py'
Traceback (most recent call last):
File "<string>", line 75, in <module>
ImportError: No module named 'xfem'
Finished executing /home/ubunt164/ngsxfem/py_tutorials/cutfem.py
Thank you for using NGSolve
could you help me please? Thank you!
Last edit: 7 years 1 week ago by Karatza.
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
7 years 1 month ago #207
by christopher
Replied by christopher on topic ngsxfem installation
Hi Karatzka,
where did you install ngsxfem to? It seems, that you have to add the folder of the ngsxfem python module to the environment variable PYTHONPATH.
Best
Christopher
where did you install ngsxfem to? It seems, that you have to add the folder of the ngsxfem python module to the environment variable PYTHONPATH.
Best
Christopher
7 years 1 month ago #210
by Karatza
Replied by Karatza on topic ngsxfem installation
Dear Christopher,
Thank you for your quick response! I used the instructions for Building xfem with pre-installed NGSolve: git clone github.com/ngsxfem/ngsxfem.git
cd ngsxfem
mkdir build
cd build
cmake ../ -DINSTALL_DIR=/home/ubunt164/ngsxfem/build -DBUILD_NGSOLVE=OFF
make
make install
So I installed it to /home/ubunt164/ngsxfem/build ... should I have used another path to make it work automatically maybe?
How can I please add the folder of the ngsxfem python module to the environment variable PYTHONPATH?
With kindest regards
Makis Karatzas
Thank you for your quick response! I used the instructions for Building xfem with pre-installed NGSolve: git clone github.com/ngsxfem/ngsxfem.git
cd ngsxfem
mkdir build
cd build
cmake ../ -DINSTALL_DIR=/home/ubunt164/ngsxfem/build -DBUILD_NGSOLVE=OFF
make
make install
So I installed it to /home/ubunt164/ngsxfem/build ... should I have used another path to make it work automatically maybe?
How can I please add the folder of the ngsxfem python module to the environment variable PYTHONPATH?
With kindest regards
Makis Karatzas
7 years 1 month ago - 7 years 1 month ago #211
by schruste
Replied by schruste on topic ngsxfem installation
Dear Makis,
It's a bit unusual to install into your build directory.
Try
export PYTHONPATH="${PYTHONPATH}:/home/ubunt164/ngsxfem/build/lib/python3.6/site-packages
to add the install-directory to your python path. Note that the directory may depend on your python version; so: check which directory exists.
Best,
Christoph
It's a bit unusual to install into your build directory.
Try
export PYTHONPATH="${PYTHONPATH}:/home/ubunt164/ngsxfem/build/lib/python3.6/site-packages
to add the install-directory to your python path. Note that the directory may depend on your python version; so: check which directory exists.
Best,
Christoph
Last edit: 7 years 1 month ago by schruste.
The following user(s) said Thank You: Karatza
7 years 1 month ago #212
by Karatza
Replied by Karatza on topic ngsxfem installation
Dear Christoph,
I tried the one you suggested but it didn't work so I made the installation again and this time I installed it in /usr/bin/, where netgen was already installed. However, during 'make install' part of the installation, it was giving me permission denied error and I used sudo apt to make install and make install worked.
xfem is still not found and for pythonpath, my /usr/bin/ has python2 and python3 installed. My computer uses python2 but since these pythons are directly installed in /usr/bin/, I don't know to which python should I do the python path and how?
I tried the one you suggested but it didn't work so I made the installation again and this time I installed it in /usr/bin/, where netgen was already installed. However, during 'make install' part of the installation, it was giving me permission denied error and I used sudo apt to make install and make install worked.
xfem is still not found and for pythonpath, my /usr/bin/ has python2 and python3 installed. My computer uses python2 but since these pythons are directly installed in /usr/bin/, I don't know to which python should I do the python path and how?
7 years 1 month ago #213
by schruste
Replied by schruste on topic ngsxfem installation
Dear Makis,
Sorry for the late reply.
I am not sure why things are not working for you.
Can you please do the following:
1.
Can you please check the paths that are shown after you type
?
Check where the __init__.py file is installed to.
It should say something like
With the installation to /usr/lib, your INSTALLLOCATION is probably just /usr
2.
Afterwards make sure to set your python path correctly, i.e.
You can check your PYTHONPATH environment variables with typing
3.
Try the installation (from the same terminal from where you exported the PYTHONPATH) with running a tutorial-file of xfem with netgen or python3.
If this is still not working, please post
Best of luck,
Christoph
Sorry for the late reply.
I am not sure why things are not working for you.
Can you please do the following:
1.
Can you please check the paths that are shown after you type
Code:
(sudo ...) make install
Check where the __init__.py file is installed to.
It should say something like
Code:
-- Installing: /INSTALLLOCATION/lib/python3.6/site-packages/xfem/__init__.py
2.
Afterwards make sure to set your python path correctly, i.e.
Code:
export PYTHONPATH="${PYTHONPATH}:/INSTALLLOCATION/lib/python3.6/site-packages
Code:
export | grep PYTHONPATH
3.
Try the installation (from the same terminal from where you exported the PYTHONPATH) with running a tutorial-file of xfem with netgen or python3.
If this is still not working, please post
- the lines from step 1. from the make install command
- the resulting PYTHONPATH from step 2.
- the error that you obtain from 3.
Best of luck,
Christoph
The following user(s) said Thank You: Karatza
Time to create page: 0.115 seconds