S4L v6.0 python pip install tkinter
-
Hi guys,
I have s4l v6.0 installed on my PC. I would like to develop some python scripts which needs tkinter modules.
I tried to directly import tkinter module, but it shows that "no module named tkinter".
Then, I tried to pip install tkinter in the command prompt window. But it comes up with "Could not find a version that satisfies the requirement tkinter"
It seems that tkinter is already installed with python 3.x versions, but I do not know what is wrong with my installation.
-
Hi guOLU,
Unfortunately the Python version that is bundled with Sim4Life does not include tkinter and it is far from trivial to install it manually. We are working on a solution but it is hard to say when it will be ready to be released.
In the meantime if you provide more detail on what you are trying to do, maybe we can find a workaround?
-
@montanaro Yes, Sim4life 5.2 should be fine. The Python version should be v2.7, I think. However, Sim4life 6.0 is using Python 3.6.8. I think this version may have some issues with tkinter package.
Perhaps, Sim4life 7.0 may fix this issue I guess.
-
Oh, too bad ... Yeah, it was working on Python 2.7
I remembered you (Sylvain) had a post about pip installing new packages, I found it here
https://forum.zmt.swiss/topic/10/how-to-install-additional-python-packages
Maybe this helps? Or maybe better to find another workaround to what you're trying to do
-
@sylvain Thanks for your help. I agree with you that this problem is caused by the Python version. Perhaps, may the Python version be upgraded in the next Sim4Life version, v7.0?
For me, actually, I would like a window popped out to selected the desired file and folder. Then I could have the directories of these files. Based on my experience, using Tkinter is an easy way to achieve this.
Currently, I already used the other modules to achieve the similar function. But it is just not as convenient as using Tkinter.
-
@jasper-goethals hei im new here, for sim4life Light v7.. still cant use Tkinter so use another module PyQt5 its not best solution but its work for me