Python script ImportError: No module named 'linuxcnc'

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

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

More
6 years 11 months ago #151361 by pl7i92
did you start linuxcnc for a first time alredy on the pi
then it shoudt also be importable

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

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

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

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

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

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

More
6 years 11 months ago #151392 by SBWZFH
Sweet! I will give that a try and update this evening..

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

Time to create page: 0.345 seconds
Powered by Kunena Forum