What's going to happen when I upgrade to python 3.10. This seems to have worked, in the sense that tkinter runs under python 3.9, but I need hardly say that I don't feel entirely comfortable with this. In /usr/lib/python3.8/lib-dynload and I copied it into /usr/lib/python3.9/lib-dynload replacing the "38" in the name with "39". I found a module named _tkinter.cpython-38-x86_64-linux-gnu.so This time, python told me no module named _tkinter. ![]() The version of pip will be displayed, if it is successfully installed on your system. If python is successfully installed, the version of python installed on your system will be displayed. On inspection, all the files in /usr/lib/python/ were still empty, so I decided to copy all the scripts from python 3.8. Type the following commands in command prompt to check is python and pip is installed on your system. I was able to import tkinter in python 3.9, by root=tkinter.Tk() failed. Install primary dependencies (git, python, php) n n For Debian (Ubuntu, Kali-Linux. (Every file in the tkinter directory, so far as I can see.) Then dpkg-reconfigure ran with no errors, so I tried sudo apt install python3-tkĪgain, and I got the same message as above, telling me that the newest package was already installed. 7 hey ive installed correctly and when i run python3 pyphisher. Step 2: After writing the above command hit the enter button and type your user password. Installing Tkinter in debian based linux. For RHEL, CentOS, Oracle Linux: sudo yum install -y tkinter tk-devel. I made a tkinter directory and added empty files for each file that dpkg complained about. For Fedora-based Linux: sudo dnf install python3-tkinter. How can I get tkinter for python 3.9?Īs suggested by ubfan1, I tried dpkg-reconfigure python3-tkīut I got the error FileNotFoundError: No such file or directory: '/usr/lib/python3.9/tkinter/_init_.py' Python3-tk is already the newest version (3.8.10-0ubuntu1~20.04).Ġ upgraded, 0 newly installed, 0 to remove and 11 not upgraded. Run the install command with -y flag to quickly install the packages and dependencies. ![]() I get the message Note, selecting 'python3-tk' instead of 'python3.9-tk' Choose Python 3.8 option and check Python version again. sudo update-alternatives -config python3. To see which version of Python 3 you have installed, open a command prompt and run python3 -version If you are using Ubuntu 16.10 or newer, then you can easily install Python 3.6 with the following commands: sudo apt-get update sudo apt-get install python3. ![]() Update default Python3 version by below command. I have just installed python 3.9, but it doesn't come with tkinter apparently. It looks like Python 3.8 is already installed but not set as default.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |