No module named vismach!!!

More
4 years 3 months ago #246690 by EdisonBin
Hello, guys!
I have a problem without a clue。

I have a project that works well in linuxcnc 2.8.2.
Today, I updated linuxcnc to 2.9, and the update went very smoothly
When I copied the project 2.9 and ran it, the terminal reported an error!
Prompt I can't find "vismach"
How can I solve it??
This project is used after I use the example of linuxcnc 2.8.2. So I don't know what caused the error it prompted。

I put the picture below, thank you
 

Please Log in to join the conversation.

More
4 years 3 months ago #246692 by EdisonBin
When I annotate the line above with errors:
# from vismach import*

Run linuxcnc again. This time, the error is the following line of code:
import hal

I'm very confused. Is there a big difference between linuxcnc2.9 and linuxcnc2.8.2?
Because in linuxcnc 2.8.2, almost all "Hal" files I create need "import Hal" at the beginning
ls there anything missing from my installation of 2.9? But the SIM of 2.9 works normally

I put the picture below
Thank you!

Please Log in to join the conversation.

More
4 years 3 months ago #246698 by Aciera
version 2.9 is python3 only.

I can't see what you have in your "mtrobot_gui" file but check that the shebang at the beginning is

#!/usr/bin/python3

or maybe:

#!/usr/bin/env python3

Please Log in to join the conversation.

More
4 years 3 months ago #246701 by EdisonBin
Thank you very much! I have no idea that this problem is the cause

I was:
#!/usr/bin/python2

Change to:
#!/usr/bin/python3

It's solved!
Thank! Now I can continue to solve the problem of switching kinematics

Please Log in to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum