← Back to team overview

yade-users team mailing list archive

Re: [Question #169842]: YADE installation for beginners. Ubuntu (natty)

 

Question #169842 on Yade changed:
https://answers.launchpad.net/yade/+question/169842

vadim posted a new comment:
I'll try to follow Anton's advise

=======================================================================
                           INSTALLATION FROM PACKAGES (YADE-DAILY)
=======================================================================

1. Download prerequisities (other programs needed for proper work of YADE).
Open the terminal (Ctrl+Alt+T) and copy/paste the prerequisites [1]:

----------------------------------------------------------------------------------------------------------------------------------------------
sudo apt-get install scons freeglut3-dev libloki-dev \
libboost-date-time-dev libboost-filesystem-dev libboost-thread-dev \
libboost-regex-dev fakeroot dpkg-dev build-essential g++ \
libboost-iostreams-dev liblog4cxx10-dev python-dev libboost-python-dev ipython \
python-matplotlib libsqlite3-dev python-numeric python-tk gnuplot doxygen \
libgts-dev python-pygraphviz libvtk5-dev python-scientific bzr bzrtools libeigen2-dev \
binutils-gold python-xlib python-qt4 pyqt4-dev-tools \
libqglviewer-qt4-dev python-imaging libjs-jquery python-sphinx
----------------------------------------------------------------------------------------------------------------------------------------------

you'll need to enter you password (you chose it during Ubuntu
installation, your own password for Ubuntu) and download up to 600 MB of
archives


2. To install yade-daily copy/paste in terminal the following:

----------------------------------------------------------------------------------------------------------------------------------------------
sudo add-apt-repository ppa:yade-pkg/snapshots
sudo apt-get update
sudo apt-get install yade-daily
----------------------------------------------------------------------------------------------------------------------------------------------

for me the installation passed quickly


3. To start yade type in terminal:

----------------------------------------------------------------------------------------------------------------------------------------------
yade-daily
----------------------------------------------------------------------------------------------------------------------------------------------

The next appeared in terminal:

----------------------------------------------------------------------------------------------------------------------------------------------
Welcome to Yade 1+2916+27~natty1, from 2011-09-01
TCP python prompt on localhost:9000, auth cookie `ceukys'
XMLRPC info provider on http://localhost:21000
**********************************************************************
Welcome to IPython. I will try to create a personal configuration directory
where you can customize many aspects of IPython's functionality in:

/home/vadim/.ipython
Initializing from configuration: /usr/lib/python2.7/dist-packages/IPython/UserConfig

Successful installation!

Please read the sections 'Initial Configuration' and 'Quick Tips' in the
IPython manual (there are both HTML and PDF versions supplied with the
distribution) to make sure that your system environment is properly configured
to take advantage of IPython's features.

Important note: the configuration system has changed! The old system is
still in place, but its setting may be partly overridden by the settings in 
"~/.ipython/ipy_user_conf.py" config file. Please take a look at the file 
if some of the new settings bother you. 


Please press <RETURN> to start IPython.
----------------------------------------------------------------------------------------------------------------------------------------------

I pressed RETURN and saw this:

----------------------------------------------------------------------------------------------------------------------------------------------
KeyboardInterrupt                            Python 2.7.1+: /usr/bin/python
                                                   Fri Sep  2 16:54:53 2011
A problem occured executing Python code.  Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.

/usr/lib/yade-daily/py/yade/__init__.pyc in <module>()
    249 # run remote access things, before actually starting the user session
    250 from yade import remote
    251 yade.remote.useQThread=(gui=='qt4')
    252 yade.remote.runServers()
    253 
    254 if gui==None:
    255 	userSession()
    256 elif gui=='qt4':
    257 	## we already tested that DISPLAY is available and can be opened
    258 	## otherwise Qt4 might crash at this point
    259 	import PyQt4
    260 	from PyQt4 import QtGui
    261 	from PyQt4.QtCore import *
    262 	import yade.qt # this yade.qt is different from the one that comes with qt3
    263 	qapp=QtGui.QApplication(sys.argv)
--> 264 	userSession(qt4=True,qapp=qapp)
    265 
    266 O.exitNoBacktrace()
    267 
    268 
    269 
    270 
    271 
    272 
    273 
    274 
    275 
    276 
    277 
    278 
    279 

/usr/lib/yade-daily/py/yade/__init__.pyc in userSession(qt4=True, qapp=<PyQt4.QtGui.QApplication object>)
    199 		#execfile=[prefix+'/lib/yade'+suffix+'/py/yade/ipython.py'],
    200 		readline_parse_and_bind=[
    201 			'tab: complete',
    202 			# only with the gui; the escape codes might not work on non-linux terminals.
    203 			]
    204 			+(['"\e[24~": "\C-Uyade.qt.Controller();\C-M"','"\e[23~": "\C-Uyade.qt.View();\C-M"','"\e[21~": "\C-Uyade.qt.Controller(), yade.qt.View();\C-M"','"\e[20~": "\C-Uyade.qt.Generator();\C-M"'] if (qt4) else []) #F12,F11,F10,F9
    205 			+['"\e[19~": "\C-Uimport yade.plot; yade.plot.plot();\C-M"', #F8
    206 				'"\e[A": history-search-backward', '"\e[B": history-search-forward', # incremental history forward/backward
    207 		]
    208 	)
    209 	
    210 	# show python console
    211 	# handle both ipython 0.10 and 0.11 (incompatible API)
    212 	if yade.runtime.ipython_version==10:
    213 		from IPython.Shell import IPShellEmbed
--> 214 		ipshell=IPShellEmbed(banner=banner,rc_override=ipconfig)
    215 		ipshell()
    216 		# save history -- a workaround for atexit handlers not being run (why?)
    217 		# http://lists.ipython.scipy.org/pipermail/ipython-user/2008-September/005839.html
    218 		import IPython.ipapi
    219 		IPython.ipapi.get().IP.atexit_operations()
    220 	elif yade.runtime.ipython_version==11:
    221 		from IPython.core.embed import InteractiveShellEmbed
    222 		# use the dict to set attributes
    223 		for k in ipconfig: setattr(InteractiveShellEmbed,k,ipconfig[k])
    224 		InteractiveShellEmbed.banner1=banner # called banner1 here, not banner anymore
    225 		ipshell=InteractiveShellEmbed()
    226 		ipshell()
    227 		# similar to the workaround, as for 0.10 (perhaps not needed?)
    228 		ipshell.atexit_operations()
    229 

/usr/lib/python2.7/dist-packages/IPython/Shell.pyc in __init__(self=<IPython.Shell.IPShellEmbed instance>, argv=None, banner='[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]', exit_msg=None, rc_override={'prompt_in1': r'Yade [\#]: ', 'prompt_in2': r'     .\D.: ', 'prompt_out': r' ->  [\#]: ', 'readline_parse_and_bind': ['tab: complete', r'"\e[24~": "\C-Uyade.qt.Controller();\C-M"', r'"\e[23~": "\C-Uyade.qt.View();\C-M"', r'"\e[21~": "\C-Uyade.qt.Controller(), yade.qt.View();\C-M"', r'"\e[20~": "\C-Uyade.qt.Generator();\C-M"', r'"\e[19~": "\C-Uimport yade.plot; yade.plot.plot();\C-M"', r'"\e[A": history-search-backward', r'"\e[B": history-search-forward'], 'separate_in': '', 'separate_out': '', 'separate_out2': ''}, user_ns=None)
    154         self.set_dummy_mode(0)
    155 
    156         # sys.displayhook is a global, we need to save the user's original
    157         # Don't rely on __displayhook__, as the user may have changed that.
    158         self.sys_displayhook_ori = sys.displayhook
    159 
    160         # save readline completer status
    161         try:
    162             #print 'Save completer',sys.ipcompleter  # dbg
    163             self.sys_ipcompleter_ori = sys.ipcompleter
    164         except:
    165             pass # not nested with IPython
    166         
    167         self.IP = make_IPython(argv,rc_override=rc_override,
    168                                embedded=True,
--> 169                                user_ns=user_ns)
        global code_queueR = undefined
        global t = undefined
        global _killt = undefined
        global gett = undefined
        global callableRS = undefined
        global Rj = undefined
        global worker_ident = undefined
        global R = undefined
        global namet = undefined
        global usageR = undefined
        global banner2Rk = undefined
        global kwRj = undefined
        global s1 = undefined
        global usr = undefined
        global lib = undefined
        global python2 = undefined
        global dist = undefined
        global packages = undefined
        global IPython = <module 'IPython' from '/usr/lib/python2.7/dist-packages/IPython/__init__.pyc'>
        global Shell.pyR = undefined
        global c = undefined
        global s = undefined
        global input = undefined
        global singlec = undefined
        global C = undefined
        global r = undefined
        global a = undefined
        global S = undefined
        global j = undefined
        global Sy = undefined
        global Wn = undefined
        global f = undefined
        global k = undefined
        global SX = undefined
        global d = undefined
        global rq = undefined
        global St = undefined
        global GHd = undefined
        global _ = undefined
        global n = undefined
        global Compile = undefined
        global run = undefined
        global some = undefined
        global source = undefined
        global the = undefined
        global interpreter.Modified = undefined
        global version = undefined
        global of = undefined
        global code.py = undefined
        global runsource = undefined
        global to = undefined
        global handle = undefined
        global threading = <module 'threading' from '/usr/lib/python2.7/threading.pyc'>
        global issues.See = undefined
        global original = undefined
        global full = undefined
        global docstring = undefined
        global details.s = undefined
        global Warning = undefined
        global Timeout = undefined
        global mainloop = undefined
        global thread = <module 'thread' (built-in)>
        global exceededs = undefined
        global switching = undefined
        global nonthreaded = undefined
        global mode = undefined
        global until = undefined
        global wakes = undefined
        global up = undefined
        global again = undefined
        global N = undefined
        global Ra = undefined
        global Rn = undefined
        global R5 = undefined
        global compilet = undefined
        global OverflowErrort = undefined
        global SyntaxErrorRO = undefined
        global showsyntaxerrorR = undefined
        global Rq = undefined
        global threadt = undefined
        global get_identR = undefined
        global runcodet = undefined
        global threadingt = undefined
        global EventRm = undefined
        global putt = undefined
        global waitRk = undefined
        global isSet = undefined
        global sourcet = undefined
        global filenamet = undefined
        global symbolt = undefined
        global codet = undefined
        global completed_evt = undefined
        global received_ev = undefined
        global Shell.pyt = undefined
        global s2 = undefined
        global sl = undefined
        global rk = undefined
        global I = undefined
        global x = undefined
        global D = undefined
        global q = undefined
        global Wt = undefined
        global IJ = undefined
        global Xd = undefined
        global y = undefined
    170 
    171         ip = ipapi.IPApi(self.IP)
    172         ip.expose_magic("kill_embedded",kill_embedded)
    173 
    174         # copy our own displayhook also
    175         self.sys_displayhook_embed = sys.displayhook
    176         # and leave the system's display hook clean
    177         sys.displayhook = self.sys_displayhook_ori
    178         # don't use the ipython crash handler so that user exceptions aren't
    179         # trapped
    180         sys.excepthook = ultraTB.FormattedTB(color_scheme = self.IP.rc.colors,
    181                                              mode = self.IP.rc.xmode,
    182                                              call_pdb = self.IP.rc.pdb)
    183         self.restore_system_completer()
    184 

/usr/lib/python2.7/dist-packages/IPython/ipmaker.pyc in make_IPython(argv=[], user_ns=None, user_global_ns=None, debug=1, rc_override={'prompt_in1': r'Yade [\#]: ', 'prompt_in2': r'     .\D.: ', 'prompt_out': r' ->  [\#]: ', 'readline_parse_and_bind': ['tab: complete', r'"\e[24~": "\C-Uyade.qt.Controller();\C-M"', r'"\e[23~": "\C-Uyade.qt.View();\C-M"', r'"\e[21~": "\C-Uyade.qt.Controller(), yade.qt.View();\C-M"', r'"\e[20~": "\C-Uyade.qt.Generator();\C-M"', r'"\e[19~": "\C-Uimport yade.plot; yade.plot.plot();\C-M"', r'"\e[A": history-search-backward', r'"\e[B": history-search-forward'], 'separate_in': '', 'separate_out': '', 'separate_out2': ''}, shell_class=<class 'IPython.iplib.InteractiveShell'>, embedded=True, **kw={})
    327     if opts_all.Version:
    328         print Release.version
    329         sys.exit()
    330 
    331     if opts_all.magic_docstrings:
    332         IP.magic_magic('-latex')
    333         sys.exit()
    334 
    335     # add personal ipythondir to sys.path so that users can put things in
    336     # there for customization
    337     sys.path.append(os.path.abspath(opts_all.ipythondir))
    338 
    339     # Create user config directory if it doesn't exist. This must be done
    340     # *after* getting the cmd line options.
    341     if not os.path.isdir(opts_all.ipythondir):
--> 342         IP.user_setup(opts_all.ipythondir,rc_suffix,'install')
    343 
    344     # upgrade user config files while preserving a copy of the originals
    345     if opts_all.upgrade:
    346         IP.user_setup(opts_all.ipythondir,rc_suffix,'upgrade')
    347 
    348     # check mutually exclusive options in the *original* command line
    349     mutex_opts(opts,[qw('log logfile'),qw('rcfile profile'),
    350                      qw('classic profile'),qw('classic rcfile')])
    351 
    352     #---------------------------------------------------------------------------
    353     # Log replay
    354     
    355     # if -logplay, we need to 'become' the other session. That basically means
    356     # replacing the current command line environment with that of the old
    357     # session and moving on.

/usr/lib/python2.7/dist-packages/IPython/iplib.pyc in user_setup(self=<IPython.iplib.InteractiveShell object>, ipythondir=u'/home/vadim/.ipython', rc_suffix='', mode='install')
   1314         If called with a non-existent field, the resulting AttributeError
   1315         exception will propagate out."""
   1316 
   1317         rc_val = getattr(self.rc,rc_field)
   1318         if value is None:
   1319             value = not rc_val
   1320         setattr(self.rc,rc_field,value)
   1321 
   1322     def user_setup(self,ipythondir,rc_suffix,mode='install'):
   1323         """Install the user configuration directory.
   1324 
   1325         Notes
   1326         -----
   1327         DEPRECATED: use the top-level user_setup() function instead.
   1328         """
-> 1329         return user_setup(ipythondir,rc_suffix,mode)
   1330 
   1331     def atexit_operations(self):
   1332         """This will be executed at the time of exit.
   1333 
   1334         Saving of persistent data should be performed here. """
   1335 
   1336         #print '*** IPython exit cleanup ***' # dbg
   1337         # input history
   1338         self.savehist()
   1339 
   1340         # Cleanup all tempfiles left around
   1341         for tfile in self.tempfiles:
   1342             try:
   1343                 os.unlink(tfile)
   1344             except OSError:

/usr/lib/python2.7/dist-packages/IPython/iplib.pyc in user_setup(ipythondir=u'/home/vadim/.ipython', rc_suffix='', mode='install', interactive=True)
    288 Important note: the configuration system has changed! The old system is
    289 still in place, but its setting may be partly overridden by the settings in 
    290 "~/.ipython/ipy_user_conf.py" config file. Please take a look at the file 
    291 if some of the new settings bother you. 
    292 
    293 """)
    294     else:
    295         printf("""
    296 Successful upgrade!
    297 
    298 All files in your directory:
    299 %(ipythondir)s
    300 which would have been overwritten by the upgrade were backed up with a .old
    301 extension.  If you had made particular customizations in those files you may
    302 want to merge them back into the new files.""" % locals() )
--> 303     wait()
        global r5 = undefined
        global n = undefined
        global Xt = undefined
        global j = undefined
        global d = undefined
        global S = undefined
        global s = undefined
    304     os.chdir(cwd)
    305 
    306 #****************************************************************************
    307 # Local use exceptions
    308 class SpaceInInput(exceptions.Exception): pass
    309 
    310 
    311 #****************************************************************************
    312 # Local use classes
    313 class Bunch: pass
    314 
    315 class Undefined: pass
    316 
    317 class Quitter(object):
    318     """Simple class to handle exit, similar to Python 2.5's.

/usr/lib/python2.7/dist-packages/IPython/iplib.pyc in wait()
    128         Valid modes are 'install' and 'upgrade'.
    129 
    130       interactive : bool, optional
    131         If False, do not wait for user input on any errors.  Normally after
    132         printing its status information, this function waits for the user to
    133         hit Return before proceeding.  This is because the default use case is
    134         when first installing the IPython configuration, so we want the user to
    135         acknowledge the initial message, which contains some useful
    136         information.
    137         """
    138 
    139     # For automatic use, deactivate all i/o
    140     if interactive:
    141         def wait():
    142             try:
--> 143                 raw_input("Please press <RETURN> to start IPython.")
        global It = undefined
        global handles = undefined
        global exiting = undefined
        global an = undefined
        global ipython = undefined
        global safe = undefined
        global manner = undefined
        global which = undefined
        global the = undefined
        global one = undefined
        global Python = undefined
    144             except EOFError:
    145                 print >> Term.cout
    146             print '*'*70
    147 
    148         def printf(s):
    149             print s
    150     else:
    151         wait = lambda : None
    152         printf = lambda s : None
    153 
    154     # Install mode should be re-entrant: if the install dir already exists,
    155     # bail out cleanly.
    156     # XXX.  This is too hasty to return.  We need to check to make sure that
    157     # all the expected config files and directories are actually there. We
    158     # currently have a failure mode if someone deletes a needed config file

KeyboardInterrupt:

**********************************************************************

Oops, IPython crashed. We do our best to make it stable, but...

A crash report was automatically generated with the following information:
  - A verbatim copy of the crash traceback.
  - A copy of your input history during this session.
  - Data on your current IPython configuration.

It was left in the file named:
	'/home/vadim/.ipython/IPython_crash_report.txt'
If you can email this file to the developers, the information in it will help
them in understanding and correcting the problem.

You can mail it to: Fernando Perez at fperez.net@xxxxxxxxx
with the subject 'IPython Crash Report'.

If you want to do it now, the following command will work (under Unix):
mail -s 'IPython Crash Report' fperez.net@xxxxxxxxx < /home/vadim/.ipython/IPython_crash_report.txt

To ensure accurate tracking of this issue, please file a report about it at:
https://bugs.launchpad.net/ipython/+filebug

Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/IPython/CrashHandler.py", line 157, in __call__
    report.write(self.make_report(traceback))
  File "/usr/lib/python2.7/dist-packages/IPython/CrashHandler.py", line 215, in make_report
    rpt_add('BZR revision   : %s \n\n' % Release.revision)
AttributeError: 'module' object has no attribute 'revision'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/yade-daily", line 264, in <module>
    userSession(qt4=True,qapp=qapp)
  File "/usr/bin/yade-daily", line 214, in userSession
    ipshell=IPShellEmbed(banner=banner,rc_override=ipconfig)
  File "/usr/lib/python2.7/dist-packages/IPython/Shell.py", line 169, in __init__
    user_ns=user_ns)
  File "/usr/lib/python2.7/dist-packages/IPython/ipmaker.py", line 342, in make_IPython
    IP.user_setup(opts_all.ipythondir,rc_suffix,'install')
  File "/usr/lib/python2.7/dist-packages/IPython/iplib.py", line 1329, in user_setup
    return user_setup(ipythondir,rc_suffix,mode)
  File "/usr/lib/python2.7/dist-packages/IPython/iplib.py", line 303, in user_setup
    wait()
  File "/usr/lib/python2.7/dist-packages/IPython/iplib.py", line 143, in wait
    raw_input("Please press <RETURN> to start IPython.")
KeyboardInterrupt
----------------------------------------------------------------------------------------------------------------------------------------------


4. Installation must be complete. Let's try it. Type in terminal:

----------------------------------------------------------------------------------------------------------------------------------------------
yade-daily
----------------------------------------------------------------------------------------------------------------------------------------------

After doing so I saw next lines:

----------------------------------------------------------------------------------------------------------------------------------------------
Welcome to Yade 1+2916+27~natty1, from 2011-09-01
TCP python prompt on localhost:9000, auth cookie `sseaud'
XMLRPC info provider on http://localhost:21000
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]: 
----------------------------------------------------------------------------------------------------------------------------------------------


Installation complete! YADE starts :)

____________________________________________________

[1] https://yade-dem.org/doc/installation.html

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.