Error: No module named linuxcnc
29 Nov 2021 02:16 #227864
by Barry
Error: No module named linuxcnc was created by Barry
When trying to run ncam.py the error message, "No module named linuxcnc" pops up. Ncam.py is located under
/usr/share/linuxcnc/aux_gladevcp/NativeCAM/ncam.py
Please note that I've used Buster with Nativecam embedded in Linuxcnc Axis with no issues for over 9 months now; however, when I upgraded to the latest Linuxcnc build for Buster at buildbot.linuxcnc.org/, Linuxcnc runs perfectly without ncam embeded but won't run with ncam embedded. The issue is that the ncam program wants to import Linuxcnc but can't find the Linuxcnc module.
I assume maybe that I need to install a global path under maybe .bashrc, or maybe a link from the/ usr/share/linuxcnc/aux_gladevcp/NativeCAM/ folder so ncam can find the Linuxcnc module, but I don't know the path to the Linuxcnc module location to try it.
It's weird that this happened, because I did this same upgrade earlier this year on a prior Linuxcnc build under Buster with no issues....it's most likely a pilot error this time.
Any suggestions you can provide would be most appreciated.
Thank you,
Barry
/usr/share/linuxcnc/aux_gladevcp/NativeCAM/ncam.py
Please note that I've used Buster with Nativecam embedded in Linuxcnc Axis with no issues for over 9 months now; however, when I upgraded to the latest Linuxcnc build for Buster at buildbot.linuxcnc.org/, Linuxcnc runs perfectly without ncam embeded but won't run with ncam embedded. The issue is that the ncam program wants to import Linuxcnc but can't find the Linuxcnc module.
I assume maybe that I need to install a global path under maybe .bashrc, or maybe a link from the/ usr/share/linuxcnc/aux_gladevcp/NativeCAM/ folder so ncam can find the Linuxcnc module, but I don't know the path to the Linuxcnc module location to try it.
It's weird that this happened, because I did this same upgrade earlier this year on a prior Linuxcnc build under Buster with no issues....it's most likely a pilot error this time.
Any suggestions you can provide would be most appreciated.
Thank you,
Barry
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 18758
- Thank you received: 6308
29 Nov 2021 02:28 #227865
by tommylight
Replied by tommylight on topic Error: No module named linuxcnc
Moved to "NativeCAM"
Please Log in or Create an account to join the conversation.
03 Dec 2021 05:17 #228256
by Barry
Replied by Barry on topic Error: No module named linuxcnc
After more trial and error this DOES NOT appear to be a NativeCam issue.
I found something interesting that may help troubleshoot this issue by those more knowledgeable of Linuxcnc than me.
Using fresh installs of Buster 2.9 and NativeCam......
Trial 1: Using Linuxcnc 2.8.2.
Open a terminal anywhere and type python. Then type import linuxcnc.
Python imports linuxcnc with no issues.
Trial 2: Using Buster Buildbot 2.9.0-pre0-3801-gd4ed11e17 (Note this is an older Buster buildbot version)
LinuxCNC launches perfectly.
Open a terminal anywhere and type python. Then type import linuxcnc.
Python imports linuxcnc with no issues.
Trial 3: Using linuxcnc Buildbot 2.9.0-pre0-5132-gaf2e71ae9 (This is the latest build)
Follow the directions on buildbot.linuxcnc.org/ to install
deb buildbot.linuxcnc.org/ buster master-rtpreempt
deb-src buildbot.linuxcnc.org/ buster master-rtpreempt
Note: After installation, LinuxCNC launches perfectly.
Open a terminal anywhere and type python. Then type import linuxcnc.
Python reports an error message: no module named linuxcnc
Note: NativeCam won't run because it can't import the module named linuxcnc under Linuxcnc Buildbot 2.9.0-pre0-5132-gaf2e71ae9!
Please let me know if you know a solution to this issue because I'm stuck.
Thank you,
Barry
I found something interesting that may help troubleshoot this issue by those more knowledgeable of Linuxcnc than me.
Using fresh installs of Buster 2.9 and NativeCam......
Trial 1: Using Linuxcnc 2.8.2.
Open a terminal anywhere and type python. Then type import linuxcnc.
Python imports linuxcnc with no issues.
Trial 2: Using Buster Buildbot 2.9.0-pre0-3801-gd4ed11e17 (Note this is an older Buster buildbot version)
LinuxCNC launches perfectly.
Open a terminal anywhere and type python. Then type import linuxcnc.
Python imports linuxcnc with no issues.
Trial 3: Using linuxcnc Buildbot 2.9.0-pre0-5132-gaf2e71ae9 (This is the latest build)
Follow the directions on buildbot.linuxcnc.org/ to install
deb buildbot.linuxcnc.org/ buster master-rtpreempt
deb-src buildbot.linuxcnc.org/ buster master-rtpreempt
Note: After installation, LinuxCNC launches perfectly.
Open a terminal anywhere and type python. Then type import linuxcnc.
Python reports an error message: no module named linuxcnc
Note: NativeCam won't run because it can't import the module named linuxcnc under Linuxcnc Buildbot 2.9.0-pre0-5132-gaf2e71ae9!
Please let me know if you know a solution to this issue because I'm stuck.
Thank you,
Barry
Please Log in or Create an account to join the conversation.
03 Dec 2021 07:09 - 03 Dec 2021 07:13 #228261
by phillc54
Replied by phillc54 on topic Error: No module named linuxcnc
Attachments:
Last edit: 03 Dec 2021 07:13 by phillc54.
Please Log in or Create an account to join the conversation.
03 Dec 2021 14:53 #228287
by Barry
Replied by Barry on topic Error: No module named linuxcnc
Yup it looks like you figured it out. Thank you! .....and as you suspected, the NativeCAM cam.py program as written does not run under Python 3, but Python 3 is required to run then latest Buster Linuxcnc 2.9 Master Branch version.
So to dig into the details a little more, I used a terminal, ran Python 3 and tried importing each module required to run NativeCAM. The following modules were "not found."
import gtk
import pygtk
pygtk.require('2.0')
from gtk import gdk
import pango
from lxml import etree
import ConfigParser
from cStringIO import StringIO
import pref_edit
import Tkinter
I'm not Python savvy enough yet to reprogram NativeCAM to run under Python 3 but if someone does know, please help.
Thank you again,
Barry
So to dig into the details a little more, I used a terminal, ran Python 3 and tried importing each module required to run NativeCAM. The following modules were "not found."
import gtk
import pygtk
pygtk.require('2.0')
from gtk import gdk
import pango
from lxml import etree
import ConfigParser
from cStringIO import StringIO
import pref_edit
import Tkinter
I'm not Python savvy enough yet to reprogram NativeCAM to run under Python 3 but if someone does know, please help.
Thank you again,
Barry
Please Log in or Create an account to join the conversation.
- SimonCNC123
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 5
29 Apr 2022 13:14 - 29 Apr 2022 13:15 #241638
by SimonCNC123
Replied by SimonCNC123 on topic Error: No module named linuxcnc
Sorry, I just saw that the original post was moved to 'NativeCam', Move if required please admins.
Last edit: 29 Apr 2022 13:15 by SimonCNC123.
Please Log in or Create an account to join the conversation.
22 Feb 2023 17:34 #265044
by Dragonick
Replied by Dragonick on topic Error: No module named linuxcnc
Hi, did you manage to do something about this topic? Did you run NativeCam on linux 2.9? Or how did you solve it?
Please Log in or Create an account to join the conversation.
Time to create page: 0.096 seconds