- Posts: 4
- Thank you received: 0
Python script ImportError: No module named 'linuxcnc'
6 years 11 months ago #151337
by SBWZFH
Python script ImportError: No module named 'linuxcnc' was created by SBWZFH
Hi everybody. First post. I am currently learning python and I am currently playing around with Linuxcnc. I installed it on a Raspberry pi 3 just to get familiar with it as I will be using it more in the near future. I am writing a python script, but am having this error when I try to run it or any other linuxcnc script.
ImportError: No module named 'linuxcnc'
I used the shell script from github.com/jefffall/build-linuxcnc-on-raspberry-pi-or-ubuntu for my installation.
As I said, I am still learning python, and after hours of googling, I have come up with nothing..
Thanks in advance for your help.
Steve.
ImportError: No module named 'linuxcnc'
I used the shell script from github.com/jefffall/build-linuxcnc-on-raspberry-pi-or-ubuntu for my installation.
As I said, I am still learning python, and after hours of googling, I have come up with nothing..
Thanks in advance for your help.
Steve.
Please Log in to join the conversation.
6 years 11 months ago #151361
by pl7i92
Replied by pl7i92 on topic Python script ImportError: No module named 'linuxcnc'
did you start linuxcnc for a first time alredy on the pi
then it shoudt also be importable
then it shoudt also be importable
Please Log in to join the conversation.
6 years 11 months ago #151364
by SBWZFH
Replied by SBWZFH on topic Python script ImportError: No module named 'linuxcnc'
I did. I have tried to run the script with linuxcnc running and not..
Please Log in to join the conversation.
6 years 11 months ago #151380
by AK
Replied by AK on topic Python script ImportError: No module named 'linuxcnc'
Hi all,
I am a new user working on a project to build mtconnect adpater for a Tormach CNC machine. I am trying to import linux cnc but I am also getting the same error 'ImportError: No module named 'linuxcnc''. While I am running the UI of the machine, I can see that the internal codes are using import linuxcnc, and the machine is working fine. But still i am unable to import it in command shell.
It would be really great if someone can help towards this concern.
I am a new user working on a project to build mtconnect adpater for a Tormach CNC machine. I am trying to import linux cnc but I am also getting the same error 'ImportError: No module named 'linuxcnc''. While I am running the UI of the machine, I can see that the internal codes are using import linuxcnc, and the machine is working fine. But still i am unable to import it in command shell.
It would be really great if someone can help towards this concern.
Please Log in to join the conversation.
6 years 11 months ago #151387
by AK
Replied by AK on topic Python script ImportError: No module named 'linuxcnc'
Hi,
I tried these steps and it worked:
> git clone git://github.com/linuxcnc/linuxcnc.git linuxcnc-dev
> cd linuxcnc-dev/src
> ./autogen.sh
> ./configure --with-realtime=uspace
> make
> sudo make setuid
> source ../scripts/rip-environment
> runtests
After the test is done successfully, just try :
->source ../scripts/rip-environment
->python
->import linuxcnc
It should work!
I tried these steps and it worked:
> git clone git://github.com/linuxcnc/linuxcnc.git linuxcnc-dev
> cd linuxcnc-dev/src
> ./autogen.sh
> ./configure --with-realtime=uspace
> make
> sudo make setuid
> source ../scripts/rip-environment
> runtests
After the test is done successfully, just try :
->source ../scripts/rip-environment
->python
->import linuxcnc
It should work!
Please Log in to join the conversation.
6 years 11 months ago #151392
by SBWZFH
Replied by SBWZFH on topic Python script ImportError: No module named 'linuxcnc'
Sweet! I will give that a try and update this evening..
Please Log in to join the conversation.
6 years 11 months ago #151403
by SBWZFH
Replied by SBWZFH on topic Python script ImportError: No module named 'linuxcnc'
Ok, that works, but only for that specific terminal instance. How do I make this more permanent?
Please Log in to join the conversation.
- grandixximo
-
- Away
- Platinum Member
-
- Where are my paaaaants?
Less
More
- Posts: 351
- Thank you received: 2
6 years 11 months ago #151405
by grandixximo
---
test signature
Replied by grandixximo on topic Python script ImportError: No module named 'linuxcnc'
I normally follow this procedure, not sure if it will work on the rpi3
linuxcnc.org/docs/master/html/code/building-linuxcnc.html
Check your dependency are all good point 4, then follow point 3.2 and you should find in your home directory linuxcnc-uspace-2.xx..deb package that you can install, once that is installed it's permanent you can run linuxcnc from any terminal and you should also have it in the start menu, and you can also uninstall like other programs from software manager or with apt or dpkg from terminal.
linuxcnc.org/docs/master/html/code/building-linuxcnc.html
Check your dependency are all good point 4, then follow point 3.2 and you should find in your home directory linuxcnc-uspace-2.xx..deb package that you can install, once that is installed it's permanent you can run linuxcnc from any terminal and you should also have it in the start menu, and you can also uninstall like other programs from software manager or with apt or dpkg from terminal.
---
test signature
Please Log in to join the conversation.
6 years 11 months ago #151519
by AK
Replied by AK on topic Python script ImportError: No module named 'linuxcnc'
It is working, but once I restart the system everything has to be done again. Any solution for that?
Please Log in to join the conversation.
6 years 10 months ago #151673
by rodw
Thats not specific to the RPI. Thats how it is.
On mint I saved a shortcut and modified it to run the last config Linuxcnc opened and load the rip-environment on statrtup.
But if you are working from the command line, you still need to run the script. Usually hitting the up arrow retrieves the command.
Replied by rodw on topic Python script ImportError: No module named 'linuxcnc'
AK wrote: It is working, but once I restart the system everything has to be done again. Any solution for that?
Thats not specific to the RPI. Thats how it is.
On mint I saved a shortcut and modified it to run the last config Linuxcnc opened and load the rip-environment on statrtup.
But if you are working from the command line, you still need to run the script. Usually hitting the up arrow retrieves the command.
Please Log in to join the conversation.
Time to create page: 0.108 seconds
