Cant install python3-pyqt5 on ubuntu 17 - linux

I`m trying to install python3-pyqt5, but still getting the same error. I tried reinstalling ubuntu, updating and upgrading my apt-get and still no clue whats wrong.
ubuntu#ubuntu:~$ sudo apt-get install python3-pyqt5
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-pyqt5

I found that I just needed to type:
sudo add-apt-repository universe
then
sudo apt-get update
And everything was working fine.

I had the same problem. After doing some reading, I was able to install pyqt5 using this workaround:
Install python3-setuptools:
$ sudo apt-get install python3-setuptools
Install pip:
$ sudo easy_install3 pip
Finally, install pyqt5 using pip:
$ pip3 install --user pyqt5

Related

No module named 'distutils.util'

I'm working on ubuntu 16.0.4 LTS and While creating a virtual environment in python 3.8 I'm getting No module named 'distutils.util'
I'm using the repository: sudo add-apt-repository ppa:deadsnakes/ppa
I have tried the following but didn't work
sudo apt install python3-distutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-distutils
I have tried the solution from this link
sudo apt install python3.8-distutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.8-distutils
E: Couldn't find any package by glob 'python3.8-distutils'
E: Couldn't find any package by regex 'python3.8-distutils'
Make sure to replace 3.10 which is version of python with appropriate version.
Installing Python3.10
Update system
$ sudo apt-get update -y && sudo apt-get full-upgrade -y
Helps to add ppa repositories
$ sudo apt install software-properties-common -y
Adding deadsnake repository
$ sudo apt-add-repository ppa:deadsnakes/ppa
Installing python
$ sudo apt-get install python3.10
$ sudo apt-get install python3.10-dev
$ sudo apt-get install python3.10-tk
Add Python 3.8 & Python 3.10 to update-alternatives
$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
Update Python 3 for point to Python 3.10
$ sudo update-alternatives --config python3
Installing distutils.util
$ sudo apt-get install python3.10-distutils
Still using python3.10 -m pip some_command might result in error to fix it use
$ curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10

Unable to install curl via apt on ubuntu 20.04

So I tried installing using apt
sudo apt update && sudo apt upgrade
sudo apt install curl
It returns done like this and then nothing happens
Reading package lists... Done
Building dependency tree
Reading state information... Done
So when checking
curl --version
nothing is returned.
Please note: Previously installed with snap but that has some issues because it couldn't install nodejs.
So removed it and trying to install from apt.
Please help.
I suggest trying to reinstall curl via apt:
sudo apt reinstall curl

Pip is not linking to my upgraded Python version. Package python3-pip is not available, but is referred to by another package

Having issues linking pip to python 3.7. Both pip and pip3 been installed but linking to Python 2.7.
I have tried to reinstall Python3 and then pip no progress.
I get the following message:
Package python3-pip 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
$ python --version
Python 3.7.4
$ pip -V
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
pip 19.2.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
$ pip3 -V
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
pip 19.2.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
$ sudo apt-get install python3-pip
[sudo] password for TarikDev:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-pip 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
E: Package 'python3-pip' has no installation candidate
First use this command
sudo apt-get update
Two packages will be downloaded, of size 16 MB. Then:
sudo apt-get install python2-pip
I tried this and it worked for me:
Step1: sudo apt-get update.
Step2: sudo apt-get install python3-pip
Then check for pip version by typing:
$ pip -V
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
go to your sources.list file with the following steps:
cd /etc/apt
sudo nano sources.list
Now edit this line in this file
deb http://http.kali.org/kali kali-rolling main non-free contrib
Now press CTRL+X key and then press y to save the buffer and then press enter.
Now try sudo apt-get update
Now type the command sudo apt-get install python3-pip
First, update the system using the update command
sudo apt-get update
Install pip package to the machine,
sudo apt-get install python2-pip python3-pip
If you are still facing challenges to install pip then try the following commands:
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
pip -V

Broken packages for installing python3-pip in Ubuntu16.04 [duplicate]

This is the command I used to install python-pip
sudo apt-get install python-pip
I get the following error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python-pip : Depends: python-setuptools (>= 0.6c1) but it is not going to be installed
Recommends: python-dev-all (>= 2.6) but it is not installable
E: Unable to correct problems, you have held broken packages.
I already installed the latest version of python-dev
When i try to install python-setuptools using
sudo apt-get install python-setuptools I get the below error
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python-setuptools : Depends: python-pkg-resources (= 3.3-1ubuntu1) but 3.3-1ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.
Explain me how to resolve the error and guide me the steps to get python-pip installed.
got the same error when I install python-pip, the following command solved my problem.
sudo apt-get install python-pkg-resources=3.3-1ubuntu1
sudo apt-get install python-setuptools
download pip from https://bootstrap.pypa.io/get-pip.py
Then run the following (which may require administrator access):
python get-pip.py
This should get you going.
If you get stuck again, read here: http://pip.readthedocs.org/en/stable/installing/
In addition to the solution that #seems recommended, I had to run this.
apt-get update
(OR)
sudo apt-get install python-setuptools python-dev build-essential
sudo easy_install pip
i have the same issue, and eventually i gave up by using:
sudo apt-get install python-pip
after tryings something like:
sudo apt-get install python-setuptools python-dev build-essential
but with no luck.
So all i did then was to:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
peace of mind.....
I think you should try:
sudo apt-get install python-pkg-resources=3.3-1ubuntu1
And then:
sudo apt-get install python-pip python-dev build-essential
It will definitely solve your issue.
Jut run this command :
sudo apt-get update
than install python tools :
sudo apt-get install python-pip
sudo apt-get install python-dev
sudo apt-get install build-essential
All the packages will get installed or some of them may say its already latest version, Thats fine

pip3 is broken and not installing packages anymore

I used to install python3 packages via pip3, however since today it is not working anymore.
Checking my history gives me this:
lkjhr#X1-Carbon-6:~$ history | grep pip3
562 pip3 install matplotlib
1029 pip3 install flask
However, since today I noticed that it is not working at all, look like I broke it or something?
lkjh#X1-Carbon-6:~$ pip --version
pip 18.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
lkjh#X1-Carbon-6:~$ pip3 --version
The program 'pip3' is currently not installed. You can install it by typing:
sudo apt install python3-pip
lkjh#X1-Carbon-6:~$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (8.1.1-2ubuntu0.4).
The following packages were automatically installed and are no longer required:
libgsoap8 libvncserver1 linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic linux-headers-4.4.0-135
linux-headers-4.4.0-135-generic linux-image-4.15.0-29-generic linux-image-4.4.0-135-generic
linux-image-extra-4.4.0-135-generic linux-modules-4.15.0-29-generic linux-modules-extra-4.15.0-29-generic
linux-signed-image-4.4.0-135-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
lkjh#X1-Carbon-6:~$ python3-pip install bokeh
python3-pip: command not found
lkjh#X1-Carbon-6:~$ pip3 install bokeh
The program 'pip3' is currently not installed. You can install it by typing:
sudo apt install python3-pip
What could go wrong? (surprised)
Thanks in advance,

Resources