No module named vismach!!!

More
06 Jul 2022 02:19 #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
 
Attachments:

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

More
06 Jul 2022 03:16 - 06 Jul 2022 03:18 #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!
Attachments:
Last edit: 06 Jul 2022 03:18 by EdisonBin.

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

More
06 Jul 2022 05:46 #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
The following user(s) said Thank You: EdisonBin

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

More
06 Jul 2022 06:18 #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 or Create an account to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum