Python script ImportError: No module named 'linuxcnc'
- SBWZFH
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
27 Nov 2019 06:43 #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 or Create an account to join the conversation.
- pl7i92
- Offline
- Platinum Member
Less
More
- Posts: 1875
- Thank you received: 354
27 Nov 2019 16:43 #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 or Create an account to join the conversation.
- SBWZFH
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
27 Nov 2019 16:47 #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 or Create an account to join the conversation.
- AK
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
27 Nov 2019 18:56 #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 or Create an account to join the conversation.
- AK
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
27 Nov 2019 19:40 #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 or Create an account to join the conversation.
- SBWZFH
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
27 Nov 2019 20:37 #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 or Create an account to join the conversation.
- SBWZFH
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
28 Nov 2019 02:40 #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 or Create an account to join the conversation.
- grandixximo
- Offline
- Premium Member
Less
More
- Posts: 132
- Thank you received: 5
28 Nov 2019 05:32 - 28 Nov 2019 05:34 #151405
by grandixximo
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.
Last edit: 28 Nov 2019 05:34 by grandixximo.
Please Log in or Create an account to join the conversation.
- AK
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
29 Nov 2019 19:41 #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 or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10812
- Thank you received: 3559
01 Dec 2019 17:41 #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'
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 or Create an account to join the conversation.
Time to create page: 0.071 seconds