installation

Asked by LiKang

 ‘ubuntu 18.04’ ,when open the yade 2019.01a,in script ’~/myYade/install/bin/yade‘ in terminal it throws the following error:
Traceback (most recent call last):
  File "/home/weicc/myYade/install/bin/yade", line 129, in <module>
    import yade
  File "/home/weicc/myYade/install/bin/yade.py", line 131, in <module>
    import yade.config
ImportError: No module named config
I follow the tutorial on the https://yade-dem.org/doc/installation.html to install the yade.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
LiKang
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

please read [1] and provide more information:
- OS version
- how you installed Yade
- how you start Yade
- complete error output
- other terminal output
- ...

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Jan Stránský (honzik) said :
#2

Hello,

please do not change the description as the answer on information request, but rather provide the information as a next comment (to preserve the discussion meaningful).
And next time please spend a little more time to formulate your question better.

Please read [1] and provide more information:
- how you installed Yade ("I follow the tutorial on the https://yade-dem.org/doc/installation.html to install the yade" is really not sufficient as there are described several very different ways to install yade)
- how you start Yade
- ...

> /home/weicc/myYade/install/bin/yade.py

what is this file (its content, how was it created, intent of use, ...)?

cheers
Jan

Revision history for this message
LiKang (likang118) said :
#3

dear Jan,
thank you so much for your help, I am sorry that yade is new for me. Besides, I am beginner in Python. My yade version is 2019.01a and I use it on ubuntu18.04 in Vmware.
The terminal outputs

"Traceback (most recent call last):
  File "/home/weicc/myYade/install/bin/yade", line 129, in <module>
    import yade
  File "/home/weicc/myYade/install/bin/yade.py", line 131, in <module>
    import yade.config
ImportError: No module named config'"

while I was running the script"~/myYade/install/bin/yade".

I follow the tutorial to install the yade.

1.i install a number of external software like:

sudo apt install cmake git freeglut3-dev libloki-dev libboost-all-dev fakeroot \
dpkg-dev build-essential g++ python3-dev python3-ipython python3-matplotlib \
libsqlite3-dev python3-numpy python3-tk gnuplot libgts-dev python3-pygraphviz \
libvtk6-dev libeigen3-dev python3-xlib python3-pyqt5 pyqt5-dev-tools python3-mpi4py \
python3-pyqt5.qtwebkit gtk2-engines-pixbuf python3-pyqt5.qtsvg libqglviewer-dev-qt5 \
python3-pil libjs-jquery python3-sphinx python3-git libxmu-dev libxi-dev libcgal-dev \
help2man libbz2-dev zlib1g-dev libopenblas-dev libsuitesparse-dev \
libmetis-dev python3-bibtexparser python3-future coinor-clp coinor-libclp-dev \
python3-mpmath libmpfr-dev libmpfrc++-dev

2. create the folder structure like:

                            myYade/ trunk/ build/ install/

3.download the trunk Yade 2019.01a

4.finish the "cmake" process with the script "cmake -DCMAKE_INSTALL_PREFIX=../install ../trunk -DNOSUFFIX=ON" and "make" ,

"make install" .There is no error occour during these process.

5.after i finish the installation ,i run the script"~/myYade/install/bin/yade". Then the error appears.

"/home/weicc/myYade/install/bin/yade.py" is one of the python module. After i finish the cmake , the file is created in the file

myYade/install/bin.

sincerely appriciate your help.
best regrads,
LiKang

Revision history for this message
Jan Stránský (honzik) said :
#4

Thanks for more info.

/home/weicc/myYade/install/bin/yade.py should not be there (only yade and yade-batch) should be in install/bin directory), it seems to be the source of the error.

where did you downloaded and extracted the source code files?
from where (from which directory) you called the cmake command?

cheers
Jan

Revision history for this message
Jan Stránský (honzik) said :
#5

Just a side note, do you need installation from source? Is there any reason why you need 2019.01a instead od 2018.02b (standard version in Ubuntu 18.04)?
Thanks
Jan

Revision history for this message
LiKang (likang118) said :
#6

thank you Jan. I may use yade to do some research about the FEM×DEM coupling later, after i master the use of yade. I downloaded

and extracted the source code files from https://launchpad.net/yade .On the right side of the site there is a list of open source.

And i am sorry that my English is not very good.So I may need a little time to organize my language.

Some of my expressions may not be very correct.I called the cmake command from

/home/weicc/myYade/build.

Revision history for this message
Jan Stránský (honzik) said :
#7

strange.. could you try to delete all the content from "install" directory and run "make install" from the build directory? What the content of install and install/bin looks like afterwards?

Revision history for this message
LiKang (likang118) said :
#8

Really thank you Jan for so patientily answer my question .

there is no content in the file "build" and "install " at begining.

Only “trunk” file has source code , after "cmake", the "install " file has three files : bin, lib, and share.

And i just run "make install" from the build directory, when i finish the "make " process.

Revision history for this message
Jan Stránský (honzik) said :
#9

just an idea, try to delete the "install/bin/yade.py" file

Revision history for this message
LiKang (likang118) said :
#10

thank you Jan, i successful slove the problem . I delete all the content from "install" directory and run "make install" from the build directory again, then there is no error occour.

Revision history for this message
LiKang (likang118) said :
#11

Thanks Jan , that solved my question.