help needed with python environment

More
27 Sep 2013 04:43 #39246 by alanb
I thought I would put a sim version of linuxcnc on a pc running ubuntu 13.04. I downloaded the source and compiled it fine. When I try to run, the program starts up ok so I get the menu options but when I choose one it terminates with an error that says it cannot find the pango library to import. Now I know this is certainly due to my strange setup. As they say a little knowledge is a dangerous thing and as far as python goes I have that little knowledge but am trying to improve :)

I started out with python 3.3.2 (latest is best!!) but discovered I should be looking at 2.7 for use with linuxcnc. So I have both versions and am running pyenv which allows a choice between versions of python. It stores different python versions in /home/alan/.pyenv/versions and I have both 2.7.5 and 3.3.2 installed. This is obviously not where the gtk libraries are installed so how do I point linuxcnc (or the python it uses) to where the libraries are? I have also downloaded compiled and installed the PyGtk source but this has not helped presumably because I didnt specify something correctly in the config file. So I need help to set everything up so that linuxcnc works with the version of python specified by pyenv and finds the pango library.

thanks
Alan

Please Log in or Create an account to join the conversation.

More
27 Sep 2013 05:41 #39248 by BigJohnT
I found this on the wiki

2.15. Making sure all package requirements have been resolved

You can check the build dependencies of the source tree against your running debian system.
If configured to build for the running kernel:

$ debian/configure -r
$ dpkg-checkbuilddeps
If configured to build without a realtime kernel (simulator mode):

$ debian/configure sim
$ dpkg-checkbuilddeps
The dpkg-checkbuilddeps command should produce no output.

Run debian/configure without any options for usage help.


from this page:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Installing_LinuxCNC

JT

Please Log in or Create an account to join the conversation.

More
27 Sep 2013 22:41 #39271 by alanb
John,
I have done all that and checkbuilddeps returns no results as it should.
make and install and run I get

Starting LinuxCNC...
io started
halcmd loadusr io started
task pid=23423
emcTaskInit: using builtin interpreter
Traceback (most recent call last):
File "/home/alan/linuxcnc/bin/axis", line 3136, in <module>
get_coordinate_font(vars.dro_large_font.get())
File "/home/alan/linuxcnc/bin/axis", line 3033, in get_coordinate_font
glnav.use_pango_font(coordinate_font, 0, 128)
File "/home/alan/linuxcnc/lib/python/glnav.py", line 6, in use_pango_font
import pango, cairo, pangocairo
ImportError: No module named pango
Shutting down and cleaning up LinuxCNC...
Cleanup done

linux-debug reports

Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
23363
PID TTY STAT TIME COMMAND
23423
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

linux-print reports

RUN_IN_PLACE=yes
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/home/alan/linuxcnc/bin
LINUXCNC_TCL_DIR=/home/alan/linuxcnc/tcl
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/home/alan/linuxcnc/rtlib
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/home/alan/linuxcnc/src/objects
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.4
INIFILE=/home/alan/linuxcnc/configs/sim/axis/axis_mm.ini
PARAMETER_FILE=sim_mm.var
TASK=milltask
HALUI=halui
DISPLAY=axis
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Starting TASK program: milltask
Starting DISPLAY program: axis
Killing task linuxcncsvr, PID=23363
Killing task milltask, PID=23423
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Alan

Please Log in or Create an account to join the conversation.

More
27 Sep 2013 23:30 #39274 by BigJohnT
I found this on the wiki after a search for pango:

wiki.linuxcnc.org/cgi-bin/wiki.pl?Build_A_Simulator_Manually

I've never built a sim...

JT

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum