- Posts: 80
- Thank you received: 0
python import linuxcnc
10 years 7 months ago #71091
by comjon
python import linuxcnc was created by comjon
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 setup.py 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.
Thanks.
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 setup.py 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.
Thanks.
Please Log in to join the conversation.
10 years 7 months ago #71224
by comjon
Replied by comjon on 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.
Please Log in to join the conversation.
10 years 7 months ago #71615
by newbynobi
Replied by newbynobi on topic python import linuxcnc
@comjon
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?
Norbert
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?
Norbert
Please Log in to join the conversation.
10 years 7 months ago #71677
by comjon
Replied by comjon on 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 LinuxCNC.py? The documentation is sketchy on this.
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 LinuxCNC.py? The documentation is sketchy on this.
Please Log in to join the conversation.
10 years 7 months ago #71686
by comjon
Replied by comjon on 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.
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.
Please Log in to join the conversation.
Time to create page: 0.136 seconds
