LinuxCNC 2.9 Python module linuxcnc error

More
4 years 3 days ago #255373 by chili023
I want to use the compensation.py methode for autoleveling of my mill.
while loading linuxcnc the pyhton script tries to load the module linuxcnc but cannot find it.
I had to install numpy and spicy before but pip cannot find a module called linuxcnc.
Code:
Traceback (most recent call last):   File "compensation.py", line 27, in <module>     import linuxcnc ImportError: No module named linuxcnc
I assume the script is running on python 2 since I used pip and not pip3.
However python3 has a module that is named linuxcnc.

Maybe someone can point me into the right direction.
I am running LINUXCNC - 2.9.0-pre0-7877-g15792c421

Thanks

 

File Attachment:

File Name: compensati...10-29.py
File Size:6.86 KB
 

File Attachment:

File Name: custom_202...29-2.hal
File Size:103 B
 

File Attachment:

File Name: SilverGlid...29-2.hal
File Size:16.52 KB
 

File Attachment:

File Name: SilverGlid...29-2.ini
File Size:5.59 KB

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

More
4 years 3 days ago #255375 by cmorley
in linuxcnc 2.9 all python programs must use python3.

Chris

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

More
4 years 3 days ago #255376 by chili023
ok how can I tell linuxcnc to use pyhton3 and not 2?

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

More
4 years 3 days ago #255377 by cmorley
how did you install linuxcnc?

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

More
4 years 3 days ago #255378 by chili023
with the package manager.
I started with the 2.8 iso and updated to 2.9.0-pre0-7877-g15792c421

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

More
4 years 3 days ago #255380 by chili023
My linuxcnc installation is using python2.
When I open python3 in the termianl and try
import linuxcnc
I get no error.
If I do that in python (2.x) <I get the error.

How can I use python3 for .py files?

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

Time to create page: 0.085 seconds
Powered by Kunena Forum