From: Guenter S. <Gue...@ph...> - 2009-08-31 23:55:22
|
Thank you for the prompt answers and I am glad it's my setup because that should be easy to fix. There is no typo in the examples. All is cut and paste out of ipython sessions. I should have mentioned I use 64bit Ubuntu. I use boost 1.35 (libboost1.35-dev) and python 2.6.2 I use this script to build and install vpython #!/bin/bash SOFTWARE=visual-5.12_release ARCHIVE=$SOFTWARE.tar.bz2 ARCHIVEDIR="$SOFTWARE" BUILDDIR=$SOFTWARE-install tar jxvf $ARCHIVE mkdir -p $BUILDDIR cd $BUILDDIR aptitude -y install libboost1.35-dev aptitude -y install libsigc++-2.0-dev libgtkmm-2.4-dev libgtkglext1-dev libgtkglext1 libgtkglextmm-x11-1.2-0 libgtkglextmm-x11-1.2-dev libglademm-2.4-1c2a libglademm-2.4-dev ../$ARCHIVEDIR/configure --prefix /usr make #as root cd $BUILDDIR make install echo /usr/lib/python2.6/site-packages >> /usr/lib/python2.6/dist-packages/site-packages.pth If necessary I will setup a clean system from scratch and install vpython there, but I'd rather fix it without going this route. Guenter Schneider Bruce Sherwood wrote: > I too am running Ubuntu 9.04, Visual 5.12, and I cannot reproduce any of these > errors. I have no idea what could be wrong. What is the statement you used to > configure the make? > > Moreover, your Example 1 is exceptionally strange, as it should not give an > error of any kind (nor does it give an error for me). Is it possible that > there's a typo in your reporting of Example 1? > > Bruce Sherwood > > Guenter Schneider wrote: >> I ran into a number of problems with vpython on Linux which appear to be >> all related. The problems do not happen in Windows. My system is ubuntu >> 9.04, vpython 5.12 compiled from source (5.11 gives identical results). >> >> Thee common feature I see on Linux is, whenever vpython raises an >> exception, python seg. faults. >> >> Example 1: >> >> In [1]: from visual import * >> >> In [2]: a = vector(1,2,3) >> >> In [3]: for i in a: >> ...: print i >> ...: >> ...: >> 1.0 >> 2.0 >> 3.0 >> Segmentation fault >> ~ $ >> >> but the following works: >> >> Example 2: >> >> In [1]: from visual import * >> >> In [2]: a = vector(1,2,3) >> >> In [3]: for i in a: >> ...: print i >> ...: if i>2: >> ...: break >> ...: >> ...: >> 1.0 >> 2.0 >> 3.0 >> >> This seems to point to the raising a StopIteration exception as the >> problem point. >> >> Example 3: >> In [1]: from visual import * >> >> In [2]: a = [1,2,3] >> >> In [3]: mag2(a) >> Out[3]: 14.0 >> >> In [4]: a = [1,2,'x'] >> >> In [5]: mag2(a) >> Segmentation fault >> ~ $ >> >> It should have raised a TypeError as in this case >> >> In [1]: from visual import * >> >> In [2]: a = [1,2,'x'] >> >> In [3]: print a[0]*a[0]+a[1]*a[1]+a[2]*a[2] >> ------> print(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]) >> --------------------------------------------------------------------------- >> TypeError Traceback (most recent call last) >> >> Finally this fails as well: >> >> Example 5: >> In [1]: from visual import * >> >> In [2]: quit() >> Do you really want to exit ([y]/n)? >> Segmentation fault >> ~ $ >> >> This error is probably caused by a SystemExit exception. >> >> Is something wrong with my install? Hard to see how to go wrong there, >> it's configure, make, make install and taking care of site-packages in >> ubuntu 9.04. >> >> Thank you for your help and the great work. >> >> Guenter Schneider >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |