Coder Social home page Coder Social logo

Comments (8)

stranskyjan avatar stranskyjan commented on August 31, 2024

ImportError: dynamic module does not define init function (initlibyade)

this indicates that python tries to import some shared library libyade, not the intended libyade.py from demfem/install directory

Do you have another Yade installed on the system?

from dem-fem-coupling.

zoheir1928 avatar zoheir1928 commented on August 31, 2024

I do not think so! is there a way to make sure there is only one Yade installed?
Can you think of any other reason behind this error?
Much appreciated

Zoheir

from dem-fem-coupling.

stranskyjan avatar stranskyjan commented on August 31, 2024

what is the output of terminal commands:

sudo updatedb
locate libyade

?

from dem-fem-coupling.

zoheir1928 avatar zoheir1928 commented on August 31, 2024

Here is the output:

/home/zoheir/FEMDEM/Installation/_build/install/libyade.py
/home/zoheir/FEMDEM/Installation/_build/install/libyade.so
/home/zoheir/FEMDEM/Installation/_build/yade/build/_build/yade/install/lib/x86_64-linux-gnu/yade/libyade.so
/home/zoheir/FEMDEM/Installation/_build/yade/build/lib/x86_64-linux-gnu/libyade.so
/usr/lib/x86_64-linux-gnu/yade/libyade.so
/usr/share/doc/libyade
/usr/share/doc/libyade/changelog.Debian.gz
/usr/share/doc/libyade/copyright
/usr/share/lintian/overrides/libyade
/var/cache/apt/archives/libyade_2018.02b-1_amd64.deb
/var/lib/dpkg/info/libyade:amd64.list
/var/lib/dpkg/info/libyade:amd64.md5sums

from dem-fem-coupling.

stranskyjan avatar stranskyjan commented on August 31, 2024

it seems python is trying to import one of libyade.so files instead of libyade.py file..

could you try instead of

import libyade

use

import imp
libyade = imp.load_source("libyade","/home/zoheir/FEMDEM/Installation/_build/install/libyade.py")

?

from dem-fem-coupling.

zoheir1928 avatar zoheir1928 commented on August 31, 2024

This time, it could not find "libyade.py" with an error: No such file or directory. There was a broken symbolic link.
I tried re-installing the codes using your makefile that I remembered during my first installation, I came across this error:
mkdir -p _build/oofem
mkdir -p _build/yade
mkdir -p _build/install
rm -rf _build/oofem/source-orig
wget http://www.oofem.org/cgi-bin/OOFEM/download.cgi?download=oofem-2.5.zip -O _build/oofem/oofem.zip
--2020-01-09 12:17:17-- http://www.oofem.org/cgi-bin/OOFEM/download.cgi?download=oofem-2.5.zip
Resolving www.oofem.org (www.oofem.org)... 147.32.130.71
Connecting to www.oofem.org (www.oofem.org)|147.32.130.71|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.oofem.org/download/oofem-2.5.zip [following]
--2020-01-09 12:17:18-- http://www.oofem.org/download/oofem-2.5.zip
Reusing existing connection to www.oofem.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 14249792 (14M) [application/zip]
Saving to: ‘_build/oofem/oofem.zip’

_build/oofem/oofem. 100%[===================>] 13.59M 2.79MB/s in 8.8s

2020-01-09 12:17:27 (1.55 MB/s) - ‘_build/oofem/oofem.zip’ saved [14249792/14249792]

unzip -q -o _build/oofem/oofem.zip
mv oofem-2.5 _build/oofem/source-orig
rm -rf _build/oofem/source
cp -r _build/oofem/source-orig _build/oofem/source
cd _build/oofem/source &&
patch -s -p0 < /home/zoheir/FEMDEM/Installation/oofem.diff
mkdir -p _build/oofem/build
cd _build/oofem/build &&
cmake -DUSE_PYTHON_BINDINGS=ON _build/oofem/source
CMake Error: The source directory "/home/zoheir/FEMDEM/Installation/_build/oofem/build/_build/oofem/source" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Makefile:120: recipe for target 'oofem-cmake' failed
make: *** [oofem-cmake] Error 1

Before, I just made the directory (/_build/oofem/build/_build/oofem/source) and copied the source code from "/_build/oofem/build/source" to it in order to make it work. Looking back, it might have not been such a good idea. This error came up during the installation of both Yade and OOFEM.

Any ideas why makefile looks for "/_build/oofem/build/_build/oofem/source" instead of "_build/oofem/source"?

from dem-fem-coupling.

stranskyjan avatar stranskyjan commented on August 31, 2024

Sorry, I tried it with different, but not the default location. Now it should work

from dem-fem-coupling.

zoheir1928 avatar zoheir1928 commented on August 31, 2024

I re-installed the code successfully.

Thanks

from dem-fem-coupling.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.