[Tutor] Installing Python 2 with Python 3 already installed

Julius Hamilton julkhami at gmail.com
Wed Aug 18 14:39:42 EDT 2021


I would like to run the tool YouTube-DL (in Ubuntu 20.04). After
installing, when I try to run it, it says "python: no such file or
directory".

I have python3 installed and working. I assume the tool is written with
Python 2.

I tried to install Python 2 with "apt-get install python", and got this
response:



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 : PreDepends: python-minimal (= 2.7.16-1) but it is not going to be
installed Depends: libpython-stdlib (= 2.7.16-1) but it is not going to be
installed Depends: python2 (= 2.7.16-1) but 2.7.17-2ubuntu4 is to be
installed E: Unable to correct problems, you have held broken packages.


How can I install the necessary version of Python in my situation and make
it available to YouTube-DL?


Thanks very much,
Julius


More information about the Tutor mailing list