Python script ImportError: No module named 'linuxcnc'

More
6 years 11 months ago #151403 by SBWZFH
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.

More
6 years 11 months ago - 6 years 11 months ago #151405 by grandixximo
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.
Last edit: 6 years 11 months ago by grandixximo.

Please Log in or Create an account to join the conversation.

More
6 years 11 months ago #151519 by AK
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.

More
6 years 11 months ago #151673 by rodw

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 or Create an account to join the conversation.

More
6 years 10 months ago #151795 by andypugh
There is a (deprecated) way to get round that, by using the --with-prefix when running ./configure. You can put the files in /usr/ but then no package manager is tracking them so updating and uninstalling is hard.

On x86 you can use buildbot packages, but there currently are none for the Pi.

You could try building your own .deb and installing that, but I didn't have much luck making debs on the Pi.

Please Log in or Create an account to join the conversation.

More
6 years 2 months ago #178077 by creigelde
You need a file named __init__.py (two underscores on each side) in every folder in the hierarchy. This is what python looks for to know that it should access a particular folder. The files are meant to contain initialization instructions but even if you create them empty this will solve it. To get rid of this error “ImportError: No module named”, you just need to create __init__.py in the appropriate directory and everything will work fine.

Please Log in or Create an account to join the conversation.

Time to create page: 0.371 seconds
Powered by Kunena Forum