LinuxCNC 2.9 Python module linuxcnc error

More
4 years 2 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

 

Attachment not found

 

Attachment not found

 

Attachment not found

 

Attachment not found

Please Log in to join the conversation.

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

Chris

Please Log in to join the conversation.

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

Please Log in to join the conversation.

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

Please Log in to join the conversation.

More
4 years 2 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 to join the conversation.

More
4 years 1 day 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 to join the conversation.

More
4 years 1 day ago #255388 by chili023
I testet a other version of the compensation.py
also import hal doesn't work.

Also tried this in python3 and python in the termianl.
Same result
python gives the error and python3 doesn't

Can I assume that my linuxcnc is using python 2?

Please Log in to join the conversation.

More
4 years 1 day ago #255414 by cmorley
what distribution are you using?

Sorry I always compile version so can't help much.
I didn't think there was a distribution that could run 2.8 and 2.9 because of the python version problem.
Hopefully someone else will chime in.

Please Log in to join the conversation.

Time to create page: 1.058 seconds
Powered by Kunena Forum