Not able to install python3-venv on Ubuntu - python

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.

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.

Package 'mysql-community-client-plugins' has no installation candidate

I am trying to install mysqlclient using pip and getting red text, saying there is no config.h file. I started fixing that and stucked on installing libmysqlcppconn-dev on Ubuntu 20. Terminal says
The following packages have unmet dependencies:
libmysqlcppconn-dev : Depends: libmysqlcppconn8-2 (= 8.0.27-1ubuntu18.04) but it is not going to be installed
After trying sudo apt install -f libmysqlcppconn8-2 I see
The following packages have unmet dependencies:
libmysqlcppconn8-2 : Depends: mysql-community-client-plugins but it is not installable
How can I fix that? Thanks everybody.

Error in installing graph-tool in Ubuntu 18.04

I followed the installation instructions in the website:
https://git.skewed.de/count0/graph-tool/-/wikis/installation-instructions
for installing graph-tool on Ubuntu 18.04, but when I write "sudo apt-get install python3-graph-tool" in the terminal, it gives me 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:
python3-graph-tool : Depends: libboost-context1.67.0 but it is not installable
Depends: libboost-iostreams1.67.0 but it is not installable
Depends: libboost-python1.67.0 but it is not installable
Depends: libboost-python1.67.0-py38 but it is not installable
Depends: libboost-regex1.67.0-icu63 but it is not installable
Depends: libc6 (>= 2.29) but 2.27-3ubuntu1 is to be installed
Depends: libgcc-s1 (>= 3.4) but it is not installable
Depends: libgomp1 (>= 9) but 8.4.0-1ubuntu1~18.04 is to be installed
Depends: libstdc++6 (>= 9) but 8.4.0-1ubuntu1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.
Does anyone know how I can fix it?
try to change the distribution
deb [ arch=amd64 ] https://downloads.skewed.de/apt DISTRIBUTION main
of the options on the page (bullseye, buster, sid, bionic, eoan, focal, groovy), only "focal" worked correctly for me.

Installing MySQL Dev Client on 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 :)

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.

Categories