Unable to install tkinter using python3.8 - python-3.x

I tried using the commands below and these are the errors I got:
(1) sudo apt-get install python3-tk:
Error : Package python3-tk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
(2) python3.8 -m pip install tkinter:
Error : Could not find a version that satisfies the requirement tkinter (from versions: )
No matching distribution found for tkinter
(3) python3.8 -m pip install python3-tk:
Error : Could not find a version that satisfies the requirement python3-tk (from versions: )
No matching distribution found for python3-tk

If you are using windows put this on your CMD:
pip install tkinter
If it doesn't work, try:
pip install tk
For Mac or Linux:
apt-get install python-tk
Make sure you have python and pip installed. You can check it in the following way:
For python:
python --version
For pip:
pip -V

Related

pip install Pillow fails

I can't install pillow on my computer anymore. When I tried pip install Pillow, I get warnings and then 2 errors :
ERROR: Could not find a version that satisfies the requirement pillow (from versions: none)
ERROR: No matching distribution found for pillow
I saw a lot of people in the same case and I tried all the solutions but nothing worked. Do you have any idea on how to re-install pillow?
Install with whatever you use to run Python, not pip directly. For example:
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow
See https://snarky.ca/why-you-should-use-python-m-pip/ for more details.

How to upgrade `pip3.8` for `python-3.8.2`? I have two python versions`(python-3.6 and python-3.8.2)` and two `pip`s (`pip3 and pip3.8`) respectively

Whenever I upgrade the pip the python-3.6 version gets upgraded and when I do same for pip3.8 I get errors. Following snippets shows the detail:
users#user01:/mnt/d/codes/py38$ pip3.8 install --upgrade pip3.8
Collecting pip3.8
ERROR: Could not find a version that satisfies the requirement pip3.8 (from versions: none)
ERROR: No matching distribution found for pip3.8
Here's the system prompts:
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
And when I run pip3.8 --versioin the following pops up:
pip 19.2.3 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
Need Help!!
Thank You!!
$ sudo pip3.8 install --upgrade pip
will give you the permissions you need.
If you aren't an administrator on the machine, you either need to su to one, or get them to run the command for you.

pip install doesn't find my highest installed version of python

My problem is that when I try to install a product that requires python >= 3.7, the installer fails, saying that it could not find the required python version, even though I do have python 3.8 installed.
I'm running Ubuntu for Windows 10 (the MS-store product.)
It comes with python 3.6 installed.
From a clean ubuntu install, I
sudo apt update
sudo apt install python3.8
sudo apt install python3-pip
At this point the command "python" is not mapped (not available), but I can run "python3" to get python3.6 or "python3.8" to get that version.
pip3 reports that it is using python 3.6.
pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
So it appears that pip is not recognizing the python 3.8 that I have.
When I attempt my product install, it fails, indicating that
sudo pip3 install --verbose (mypackage name)
(... various messages...)
(requires-python:>=3.7) is incompatible with the pythonversion in use. Acceptable python versions are:>=3.7
Could not find a version that satisfies the requirement cbordplatform (from versions: )
No matching distribution found for (my package name)
How can I get pip3 to recognize my python3.8?
If you want to make sure that pip is using the correct version of Python, call it with the specific Python like this:
python3.8 -m pip ...

pip install not working -- How to install/upgrade PyPi packages with pip v10 and above, using Python?

After upgrading my pip to version 10 using pip3 install --upgrade pip and above I cannot I want to install/upgrade PyPi packages using pip3 install PyPiPackageName as I get the following error:
from pip import main
ImportError: cannot import name main
I wonder how I can install PyPi packages using pip when I'm using new versions of pip? I've seen some people use pyhton3 to do this but doing python3 -m pip install --upgrade pip gave me the following error and I cannot upgrade pip to higher versions:
/usr/bin/python3: No module named pip
Before doing python3 -m pip install --upgrade pip I do python3 -m pip install -U pip and I get the following error:
/usr/bin/python3: No module named pip
So I'm confused on what I need to do to be able to upgrade or install PyPi packages.
In addition to executing the following:
curl https://bootstrap.pypa.io/get-pip.py | python3.6
I also had to make sure python3 is using Python 3.6 otherwise Python 3.5 is used (which does not come with pip by default). So I did the following and things work fine now:
ln -s /usr/bin/python3.6 /usr/local/bin/python3

How do i install python3 threading module in linux ubuntu

When i try to install to threading module in python3 that error occurs:
Could not find a version that satisfies the requirement threading (from versions: )
No matching distribution found for threading
I have been tried these for installing :
pip3 install threading
pip3 install thread
python3 -m pip install threading
python3 -m pip install thread
sudo apt-get install python3-threading
sudo apt-get install python3-thread
I've been tried these.And first four occurs that:
Could not find a version that satisfies the requirement thread (from versions: )
No matching distribution found for thread
and last two
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-threading(or thread)
what could i do for install that module.
You can run:
pip install thread6
pip is a package manager for python and is used for installing python packages or modules. Be aware that you might have python2.x also on your system and pip v2 might be invoked with this command. To be safe, run:
pip3 install thread6
If you install thread6 you will be able to import threading

Resources