Welcome to ask.woodem.org. You may post when you login through your GitHub account.

Problems to run woo on linux ubuntu

0 votes
283 views
asked Jul 26, 2016 by edudutraufmg (250 points)
edited Jul 26, 2016 by eudoxos

I installed woo in linux ubuntu an I'm having trouble acessing the graphical part,  I am new on woo.

It is giving the error below, if someone can help me

problems to run on linux ubuntu:
 


~$ woo
Welcome to Woo ver. 1.1+3976+39~ubuntu16.04.1, API 10103
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/usr/bin/woo in <module>()
      7 if __name__ == '__main__':
      8     sys.exit(
----> 9         load_entry_point('woo===1.1-3976-39-ubuntu16.04.1', 'console_scripts', 'woo')()
     10     )

/usr/lib/python2.7/dist-packages/wooMain.pyc in main(sysArgv)
    327     #
    328     try:
--> 329         import woo.qt # this import fails if running with -n or $DISPLAY can't be connected to
    330         if 'qt4' in woo.config.features: gui='qt4'
    331         else: gui='qt5'

/usr/lib/python2.7/dist-packages/woo/qt/__init__.py in <module>()
     93
     94             import IPython.lib.inputhook #guisupport
---> 95             wooQApp=IPython.lib.inputhook.enable_gui(gui='qt4' if 'qt4' in woo.config.features else 'qt5')
     96
     97             #from IPython.lib.guisupport import start_event_loop_qt4

/usr/lib/python2.7/dist-packages/IPython/lib/inputhook.pyc in enable_gui(gui, app)
    538     except KeyError:
    539         e = "Invalid GUI request %r, valid ones are:%s" % (gui, guis.keys())
--> 540         raise ValueError(e)
    541     return gui_hook(app)
    542

ValueError: Invalid GUI request 'qt5', valid ones are:['osx', 'qt4', 'glut', None, 'gtk3', 'pyglet', 'wx', 'none', 'qt', 'gtk', 'tk']

 

commented Jul 26, 2016 by eudoxos (44,930 points)

PS you are welcome to sign your posts like most people on forums do ;)

1 Answer

0 votes
answered Jul 26, 2016 by eudoxos (44,930 points)
selected Jul 29, 2016 by eudoxos
 
Best answer

Hi, you installed Woo with qt5 on Ubuntu 16.04 which packages ipython not supporting qt5 yet. What you need to do is to install ipython>=5.0 from python package repository (not by apt-get), which you can do in this way:

sudo apt-get install python-pip

sudo pip install --system 'ipython>=5.0'

You can also run without "--system", or may use easy_install instead of pip. The pip installation (in /usr/local/lib with --system, probably) will take precedence over older ipython installed by apt-get.

I recommend to install python3-woo, since python2 support will be dropped in some (distant) feature. You scripts will be most likely compatible between the both, but going with 3.x is advisable if you have choice.

I also added the points you raise to the documentation https://woodem.org/user/installation.html#package-installation .

Hope this helps,

Vaclav

commented Jul 29, 2016 by eudoxos (44,930 points)

Please try import woo.qt, otherwise I don't know why woo.qt does not work. If there is no problem with import woo.qt, then use woo.qt.Controller() to open the controller. Otherwise post the error you get. Cheers, Vaclav

commented Jul 29, 2016 by edudutraufmg (250 points)

Typing import woo.qt

$ Woo mill.py
Purging old / tmp / tmp-woo-70e1b5d9 (pid = 5735)
Welcome to Woo see. 1.1 + 3977 + 39 ~ ubuntu16.04.1, API 10103
Running script mill.py
/usr/lib/python3/dist-packages/past/builtins/misc.py:79: DeprecationWarning: 'U' mode is deprecated
with open (filename, "RBU") the fin:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/wooMain.py", line 375, in runScript
execfile (script, globals ())
File "/usr/lib/python3/dist-packages/past/builtins/misc.py", line 82, in execfile
exec_ (code, myglobals, mylocals)
File "mill.py", line 38, in
millPar,centralNode=woo.triangulated.ribbedMill((-.5millDp,0,0),(.5millDp,0,0),radius=millRad,majNum=bumpNum,majHt=bumpHt,majTipAngle=bumpTipAngle,div=24,wire=False,color=.5)
AttributeError: module 'woo' has no attribute 'triangulated'
[[^ L clears screen, ^ U kills line. F12 controller, F11 3D view, F10 BOTH F8 plot. ]]
Woo [1]: import woo.qt


ImportError Traceback (most recent call last)
/usr/lib/python3/dist-packages/wooMain.py in ()
----> 1 import woo.qt

/usr/lib/python3/dist-packages/woo/qt/init.py in ()
119
120
-> 121 from woo.qt.uicontroller import UiController
122
123 from woo.qt.Inspector import *

/usr/lib/python3/dist-packages/woo/qt/uicontroller.py in ()
687 self.controllerTabs.setTabText (self.controllerTabs.indexOf (self.aboutTab) _translate ( "Controller", "About"))
688
-> 689 import img
rc

ImportError: No module named 'img_rc'

and typing woo.qt.Controller () gives the error

Woo [2]: import woo.qt


ImportError Traceback (most recent call last)
/usr/lib/python3/dist-packages/wooMain.py in ()
----> 1 import woo.qt

/usr/lib/python3/dist-packages/woo/qt/init.py in ()
119
120
-> 121 from woo.qt.uicontroller import UiController
122
123 from woo.qt.Inspector import *

/usr/lib/python3/dist-packages/woo/qt/uicontroller.py in ()
687 self.controllerTabs.setTabText (self.controllerTabs.indexOf (self.aboutTab) _translate ( "Controller", "About"))
688
-> 689 import img
rc

ImportError: No module named 'img_rc'

commented Jul 29, 2016 by eudoxos (44,930 points)

You need to update Woo to get the latest, I fixed this error yesterday. Run in the terminal (not in Woo): sudo apt-get update and then sudo apt-get install python3-woo. You should see version 1.1+3979+39 after you run Woo. Cheers, vaclav

commented Jul 29, 2016 by edudutraufmg (250 points)

Cheers, Vaclav

mill.py the script worked perfect in woo

Thanks a lot for the help.

Now is studying woo and python.

Best Regards,
Eduardo Dutra

commented Jul 29, 2016 by eudoxos (44,930 points)

Nice. Thanks for your help in finding the problem, I was able to fix the package. Cheers, Vaclav

...