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,
Related
I am trying to install libssl-dev and libssl1.0-dev in Ubuntu 18.04 via the following command:
sudo apt-get -y install build-essential openssl libssl-dev libssl1.0 libgl1-mesa-dev libqt5x11extras5
I am getting the following output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libssl1.0-dev' for regex 'libssl1.0'
Note, selecting 'libssl1.0.0' for regex 'libssl1.0'
Note, selecting 'libssl1.0.2' for regex 'libssl1.0'
build-essential is already the newest version (12.4ubuntu1).
libqt5x11extras5 is already the newest version (5.9.5-0ubuntu1).
libqt5x11extras5 set to manually installed.
libgl1-mesa-dev is already the newest version (20.0.8-0ubuntu1~18.04.1).
libgl1-mesa-dev set to manually installed.
libssl-dev is already the newest version (1.1.1-1ubuntu2.1~18.04.20).
libssl1.0.0 is already the newest version (1.0.2n-1ubuntu5.10).
openssl is already the newest version (1.1.1-1ubuntu2.1~18.04.20).
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:
libssl-dev : Conflicts: libssl1.0-dev but 1.0.2n-1ubuntu5.10 is to be installed
libssl1.0-dev : Conflicts: libssl-dev but 1.1.1-1ubuntu2.1~18.04.20 is to be installed
E: Unable to correct problems, you have held broken packages.**
How do I solve these errors?
There are three ways to install libssl1.0-dev on Ubuntu. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install libssl1.0-dev Using apt-get
sudo apt-get update
sudo apt-get -y install libssl1.0-dev
Install libssl1.0-dev Using apt
sudo apt update
sudo apt -y install libssl1.0-dev
Install libssl1.0-dev Using aptitude
sudo aptitude update
sudo aptitude -y install libssl1.0-dev
The following sequence of commands should work to resolve dependencies.
# Fix broken dependencies on your system.
sudo apt-get install -f
# Reconfigure all unpacked packages.
sudo dpkg -–configure -a
# Fix broken dependencies in your system.
sudo apt-get install -f
# Install package on the system.
sudo apt-get install <package_name>
Probably the solution to my problem is easy, I just do not have enough knowledge to solve it.
I have a Raspberry Pi 4 with Raspberry OS (buster) on it . It comes with python 2.7 and 3.7 preinstalled and they contain pygame package too.
In the meantime I installed miniconda3 and upgraded it to python 3.6. Now I would like to use pygame through this python.
Unfortunately whatever I try I always get some error messages. Probably there is a way to link the pygame in the preinstalled python 3.7 to my miniconda python, but I do not know how to do that. Here is a list what did I try and what error did I get.
I installed the following packages (thinking they could help, but not really):
sudo apt install libsdl1.2-dev
sudo apt-get install build-essential libfreeimage-dev libopenal-dev libpango1.0-dev libsndfile-dev libudev-dev libasound2-dev libjpeg9-dev
sudo apt-get install libtiff5-dev libwebp-dev automake
sudo apt install libsdl2-2.0-0 libsdl2-dev libsdl2-ttf-2.0-0 libsdl2-ttf-dev
Copied the pygame folder from the python3.7/dist-packages to miniconda3/lib/python3.6/site-packages/pygame. When I import the error message is:
File "/home/pi/miniconda3/lib/python3.6/site-packages/pygame/__init__.py", line 136, in <module>
from pygame.base import *
ModuleNotFoundError: No module named 'pygame.base'
sudo apt install python3-pygame: Message:
python3-pygame is already the newest version (1.9.4.post1+dfsg-3).
pip install pygame==1.9.4: Error:
Using UNIX configuration...
Hunting dependencies...
SDL : found 1.2.15
FONT : not found
IMAGE : not found
MIXER : not found
PNG : found
JPEG : found
SCRAP : found
PORTMIDI: not found
PORTTIME: not found
FREETYPE: found 22.1.16
Missing dependencies
I guess here I need to install some packages but I do not know how.
I tried from conda too:
conda config --add channels cogsci
conda install -c cogsci pygame
Error message:
PackagesNotFoundError: The following packages are not available from current channels:
- pygame
Current channels:
- https://conda.anaconda.org/cogsci/linux-armv7l
- https://conda.anaconda.org/cogsci/noarch
- https://conda.anaconda.org/rpi/linux-armv7l
- https://conda.anaconda.org/rpi/noarch
- https://repo.anaconda.com/pkgs/main/linux-armv7l
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/linux-armv7l
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/linux-armv7l
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/pro/linux-armv7l
- https://repo.anaconda.com/pkgs/pro/noarch
I see that conda does not see the repository, but I thought I have just added it with the command above.
Could someone tell me, how could I solve this issue?
Thanks
Finally I managed to find out a solution to this problem. Basically tried to solve the problem in point 3. above. I had a few packages missing for pygame. Here are the packages that if you install pygame will not complane:
sudo apt install libsdl1.2-dev
sudo apt-get install build-essential libfreeimage-dev libopenal-dev libpango1.0-dev libsndfile-dev libudev-dev libasound2-dev libjpeg9-dev
sudo apt-get install libtiff5-dev libwebp-dev automake
sudo apt-get install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy subversion libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev
pip install pygame==1.9.4
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
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
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