python import linuxcnc

05 Mar 2016 18:52 #71091 by comjon
comjon created the topic: python import linuxcnc
From the Python API documentation, it appears "import linuxcnc" works for most people in a .py file if you install LinuxCNC from a LiveCD. I am integrating applications into my Ubuntu build, and added Python before I installed LinuxCNC.

Python can not find LinuxCNC modules (a.k.a. includes, libraries, you get the idea) and I therefore can not code with linuxcnc objects.

I have read a good bit about the "python install" command and what should be straightforward has become a beast. I need in simple language ideas how to get this module working in my .py file.

08 Mar 2016 14:48 #71224 by comjon
comjon replied the topic: python import linuxcnc
My plan at this time is: 1) build a fresh LinuxCNC install from the Live CD (I need to do this anyway on a new box, and. I can test whether a fresh install solves what I believe is an issue with dependencies on the box that spawned this thread. Once LinuxCNC is built, I will add Python IDE, then check if LinuxCNC is available as a module in Python by calling with "import linuxcnc ". If all goes well I can install the NINJA IDE.
14 Mar 2016 09:40 #71615 by newbynobi
newbynobi replied the topic: python import linuxcnc

it does not matter if you install linuxcnc before or after python.
If import linuxcnc throws an error, than it is not included in your PYTHON_PATH

Where is the module installed?
And to what locations point your pythonpath?

15 Mar 2016 12:12 - 15 Mar 2016 12:23 #71677 by comjon
comjon replied the topic: python import linuxcnc
Under "Project Properties" I added ~/git/LinuxCNC/
to the Custom Pythonpath dialogue.

This directory is the one from which I launch LinuxCNC in Terminal.

I am not certain of the name of the module I should add, is it The documentation is sketchy on this.
Last Edit: 15 Mar 2016 12:23 by comjon.
15 Mar 2016 16:52 #71686 by comjon
comjon replied the topic: python import linuxcnc
I bailed on NINJA-IDE for now. Eclipse is easier to use and once I got the PyDev add-ins, everything fell into place.

Thanks for the reply Norbert. You can read my other posts to learn what I am trying to accomplish on a Sherline / /LinuxCNC / MTConnect project.
Time to create page: 0.250 seconds
Powered by Kunena Forum