Installing MySQL Dev Client on Python - python

When I try running
sudo apt-get install python-pip python-dev libmysqlclient-dev
I get the following
Reading package lists...
Done Building dependency tree
Reading state information...
Done libmysqlclient-dev is already the newest
version.
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
Depends: python-requests 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

The Error says that you libmysqlclient-dev is already installed and on the newest version.
Please check that.
But it also says you need the following packages:
python-setuptools
python-requests
python-dev-all
Consider downloading/updating these via pip install and then try again :)

Related

Unable to uninstall python3.7 in Ubuntu20.04

my problem is that i did a standard update through ubuntus update programm.
Now everytime I try to use apt for anything, it throws the following error:
sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libpython3.7-stdlib : Depends: libpython3.7-minimal (= 3.7.12-1+focal1) but 3.7.13-1+focal3 is installed
python3.7 : Depends: libpython3.7-stdlib (= 3.7.13-1+focal3) but 3.7.12-1+focal1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I so far tried:
sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
python3.7-distutils python3.7-lib2to3
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libpython3.7-stdlib
The following packages will be upgraded:
libpython3.7-stdlib
1 upgraded, 0 newly installed, 0 to remove and 363 not upgraded.
1 not fully installed or removed.
Need to get 1.773 kB of archives.
After this operation, 90,1 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal/main amd64 libpython3.7-stdlib amd64 3.7.13-1+focal3 [1.773 kB]
Fetched 1.773 kB in 0s (4.827 kB/s)
(Reading database ... 329479 files and directories currently installed.)
Preparing to unpack .../libpython3.7-stdlib_3.7.13-1+focal3_amd64.deb ...
Unpacking libpython3.7-stdlib:amd64 (3.7.13-1+focal3) over (3.7.12-1+focal1) ...
dpkg: error processing archive /var/cache/apt/archives/libpython3.7-stdlib_3.7.1
3-1+focal3_amd64.deb (--unpack):
trying to overwrite '/usr/lib/python3.7/distutils/__init__.py', which is also i
n package python3.7-distutils 3.7.12-1+focal1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libpython3.7-stdlib_3.7.13-1+focal3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get autoremove --purge python3.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libpython3.7-stdlib : Depends: libpython3.7-minimal (= 3.7.12-1+focal1) but 3.7.13-1+focal3 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
and bascially every other version of apt remove, but to no prevail.
Thank you guys in advance!
I ran into the same issue today and for me this worked:
In our case it is:
sudo dpkg -P python3.7
sudo dpkg -P libpython3.7-stdlib
No guarantees on this being safe or anything, it just seems to have worked for me.
Hope it helps you and others having this problem.

Not able to install python3-venv on Ubuntu

I'm using python 3.6.9 on Ubuntu 18.04
$ sudo apt-get install python3-venv
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:
python3-venv : Depends: python3.6-venv (>= 3.6.5-2~) but it is not going to be installed
Depends: python3 (= 3.6.5-3) but 3.6.7-1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.

Why does it gives error while installing pip? [duplicate]

This question already has an answer here:
This is the result I get when trying to install pip3
(1 answer)
Closed 1 year ago.
I am getting error while installing pip. I have python 3.9.2 installed.
root#kali:~# sudo apt-get install python3-pip
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:
python3-pip : Depends: python3-distutils but it is not going to be installed
Depends: python3-setuptools but it is not going to be installed
Recommends: python3-dev (>= 3.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root#kali:~# ^C
enter image description here
Pip comes installed with Python 2 >=2.7.9 or Python 3 >=3.4.
First check it using:
python -m pip --version
To install it manually:
First, run this code to download get-pip.py using curl.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
Then, run this command in the folder that you have installed get-pip.py
python get-pip.py
It’s weird but I thought apt-get is supposed to retrieve any dependencies. Yet it tells you what it’s missing and refuses to install them. Have you tried to install the dependencies, then pip?
I’m not too familiar with apt-get but I recommend checking the error message to get to the bottom of why it refuses to install the dependencies. Your screen shot doesn’t have the whole message.
The last resort is the force install option. See if it understands --force as an argument. Note that this might put your package management system in a strange state if it isn’t already.
I’m not sure what “ig” is but I do not plan to link other social network applications to this one.

Error Install Matplotlib for Python3 on Debian 9

I'm trying to install MatPlotLib for Python3 using Debian 8. The pip3
command asks for the missing dependency: libfreetype. However, this is what happens when I try to install this package!
debnub#debhub:~$ sudo apt-get install libfreetype6-dev
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:
libfreetype6-dev : Depends: libfreetype6 (= 2.5.2-3+deb8u2) but 2.
6.3-3.2 is to be installed
E: Unable to correct problems, you have held broken packages.
debnub#debhub:~$
I've tried a lot of different solutions including using aptitude. Is there anything I might be missing in this case?
This was solved by running:
sudo aptitude -f install libfreetype6-dev
And then selecting no to downgrade the installed version of libfreetype6.

How to install python-numpy on OSX using apt-get?

so I have tried installing numpy using Homebrew. While it said on home-brew that I successfully installed it, the program I run couldn't detect it and it recommend using apt-get.
So I got apt-get through fink, but I couldn't install numpy like I wanted to.
The most relevant answer I found online is here:
http://mrprajesh.blogspot.hk/2009/11/e-couldnt-find-package-on-apt-get.html
But it only covers linux and I am not sure how to do the same on an OSX machine. Does anyone has experience with this?
Below is the error message. Any help is appreciated.
yings-mbp:madanalysis5 yvonne$ sudo apt-get install python-numpy
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package python-numpy
yings-mbp:madanalysis5 yvonne$ sudo apt-get install update
Password:
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package update
yings-mbp:madanalysis5 Sam$
In my opinion the best way to installing numpy and scipy, is just download Anaconda, even though its large, things are compiled and just work. If you need a smaller package then get miniconda, and run "conda install numpy". If you don't care for space, just get anaconda.

Categories