Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserWarnings after "python setup.py install" #26

Open
Fvergnet opened this issue Mar 19, 2018 · 14 comments
Open

UserWarnings after "python setup.py install" #26

Fvergnet opened this issue Mar 19, 2018 · 14 comments

Comments

@Fvergnet
Copy link

Hi Mikaem,

I cloned fenicstools and installed it with the command "python setup.py install". Importing your library I have the following error :

/Users/anonymous/anaconda2/envs/pyfenics/lib/python3.6/site-packages/fenicstools/init.py:7: UserWarning: Probe/Probes/StatisticsProbe/StatisticsProbes not installed
warnings.warn("Probe/Probes/StatisticsProbe/StatisticsProbes not installed")
/Users/anonymous/anaconda2/envs/pyfenics/lib/python3.6/site-packages/fenicstools/init.py:12: UserWarning: StructuredGrid/ChannelGrid not installed
warnings.warn("StructuredGrid/ChannelGrid not installed")
/Users/anonymous/anaconda2/envs/pyfenics/lib/python3.6/site-packages/fenicstools/init.py:42: UserWarning: ClementInterpolation not installed
warnings.warn("ClementInterpolation not installed")
/Users/anonymous/anaconda2/envs/pyfenics/lib/python3.6/site-packages/fenicstools/init.py:47: UserWarning: Lagrangian particles not installed
warnings.warn("Lagrangian particles not installed")

Do you have any idea how to solve this issue ?

@jorgensd
Copy link

I have the same issue

@mikaem
Copy link
Owner

mikaem commented Jan 23, 2019

Well, it worked for me 4 months ago:-) First of all, are you using a compatible FEniCS version? If you think that you are, then please find out more about what is going wrong. Have a look at where the error occurs. Now do for example

from fenicstools.Probe import Probe

This should at least give us an indication about what goes wrong.

@jorgensd
Copy link

That is a very good question. I'm currently using the docker image of FEniCS,
docker run -ti quay.io/fenicsproject/stable:current, then cloning and installing as:

git clone https://github.com/mikaem/fenicstools.git
cd fenicstools
sudo python3 setup.py install --prefix=/usr/local

Trying to import probe yields the following:

In [1]: from fenicstools.Probe import Probe
/usr/local/lib/python3.6/dist-packages/fenicstools/__init__.py:7: UserWarning: Probe/Probes/StatisticsProbe/StatisticsProbes not installed
  warnings.warn("Probe/Probes/StatisticsProbe/StatisticsProbes not installed")
/usr/local/lib/python3.6/dist-packages/fenicstools/__init__.py:12: UserWarning: StructuredGrid/ChannelGrid not installed
  warnings.warn("StructuredGrid/ChannelGrid not installed")
/usr/local/lib/python3.6/dist-packages/fenicstools/__init__.py:17: UserWarning: weighted_gradient_matrix/compiled_gradient_module not installed
  warnings.warn("weighted_gradient_matrix/compiled_gradient_module not installed")
/usr/local/lib/python3.6/dist-packages/fenicstools/__init__.py:22: UserWarning: getMemoryUsage/SetMatrixValue not installed
  warnings.warn("getMemoryUsage/SetMatrixValue not installed")
/usr/local/lib/python3.6/dist-packages/fenicstools/__init__.py:27: UserWarning: gauss_divergence/divergence_matrix not installed
  warnings.warn("gauss_divergence/divergence_matrix not installed")
/usr/local/lib/python3.6/dist-packages/fenicstools/__init__.py:32: UserWarning: interpolate_nonmatching_mesh/interpolate_nonmatching_mesh_any not installed
  warnings.warn("interpolate_nonmatching_mesh/interpolate_nonmatching_mesh_any not installed")
/usr/local/lib/python3.6/dist-packages/fenicstools/__init__.py:37: UserWarning: DofMapPlotter not installed
  warnings.warn("DofMapPlotter not installed") # Probably missing dependency

Earlier today I did some debugging, and i think I saw an error linking to scitools, which is only python2.7 compatible as far as I know

@mikaem
Copy link
Owner

mikaem commented Jan 23, 2019

I need to see one of the errors captured in the try: except clauses here.

@jorgensd
Copy link

 /home/fenics/local/lib/python3.6/site-packages/fenicstools/__init__.py(6)<module>()
-> from fenicstools.Probe import Probe, Probes, StatisticsProbe, StatisticsProbes
(Pdb) s
--Call--
> <frozen importlib._bootstrap>(966)_find_and_load()
(Pdb) n
> <frozen importlib._bootstrap>(968)_find_and_load()
(Pdb) n
> <frozen importlib._bootstrap>(969)_find_and_load()
(Pdb) n
> <frozen importlib._bootstrap>(970)_find_and_load()
(Pdb) n
> <frozen importlib._bootstrap>(971)_find_and_load()
(Pdb) n
nPermissionError: [Errno 13] Permission denied: '/home/fenics/local/lib/python3.6/site-packages/fenicstools/probe/.rendered.probe11.cpp'
> <frozen importlib._bootstrap>(971)_find_and_load()

@mikaem
Copy link
Owner

mikaem commented Jan 23, 2019

Aha! So there is a permission error on the docker. But that seems weird, the location '/home/fenics/local..' should be open? Could you try to build really locally? With python setup.py build_ext -i. Or simply add the location of the clone to pythonpath and then import fenicstools?

@jorgensd
Copy link

jorgensd commented Jan 23, 2019

So list of stuff i needed when using the stable fenics-docker image:

  1. Run the python program as sudo
  2. Install cppimport: sudo pip3 install cppimport
  3. Install python3-h5py and pyvtk, sudo apt-get install python3-h5py, sudo pip3 install pyvtk

After this, I get the following:

  warnings.warn("Errors occurred attempting to import surfc and meshgrid from scitools")
--Return--

As far as I know, scitools only support python2.7. However, the 2018.1.0 release of dolfin only supports python3.

@mikaem
Copy link
Owner

mikaem commented Jan 23, 2019

So then everything works except the part with StructuredGrid that want to use scitools?

@mikaem
Copy link
Owner

mikaem commented Jan 23, 2019

And I should add install_requires with cppimport, python3-h5py and pyvtk to my setup:-) Note that python3-h5py is probably serial.

@jorgensd
Copy link

And I should add install_requires with cppimport, python3-h5py and pyvtk to my setup:-) Note that python3-h5py is probably serial.

Do you know how to get the parallel mpi version?
At least the interpolation routine works now.
https://github.com/mikaem/fenicstools/wiki/Interpolation-nonmatching-mesh-in-parallel

@mikaem
Copy link
Owner

mikaem commented Jan 23, 2019

You have to compile it yourself in parallel. It's not very difficult, I keep parallel versions on anaconda cloud, but only for conda. See docker-fenics-recipes for some build scripts to follow on the docker.

@duyuan11
Copy link

duyuan11 commented Feb 4, 2020

Hi, @mikaem: I am a beginner of fenicstools, but I still could not succefully import fenicstools, even I follow all your discussion before. Could you please summarize a list step by step how to set up fenicstools? (I am using docker run fenics 2017.2.0)
Thank you!

@Tom303-afk
Copy link

I followed the above steps and everything works except the part with StructuredGrid that want to use scitools, just like you mentioned. Do you think we could find a way to solve this?
I do not get Time-series files, which I suspect might be because I get the error for scitools surfc and meshgrid.

@apirogov
Copy link

apirogov commented Oct 1, 2021

Please do add cppimport as a dependency, stumbled onto the same issue today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants