mister-monster / YouTube2PeerTube

A bot written in Python3 that mirrors YouTube channels to PeerTube channels as videos are released in a YouTube channel.
GNU Affero General Public License v3.0
134 stars 17 forks source link

Conflicting dependencies on Raspbian 11 #25

Open rayelliottdev opened 2 years ago

rayelliottdev commented 2 years ago
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

results in:

ERROR: Cannot install -r requirements.txt (line 6) and urllib3==1.26.5 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested urllib3==1.26.5
    requests 2.22.0 depends on urllib3!=1.25.0, !=1.25.1, <1.26 and >=1.21.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

I was able to get it running by removing the package version from urllib3 which results in version 1.25.11 being used.

mister-monster commented 2 years ago

I'm trying to understand why you're running into this problem when I have not, nor has any other user brought it to my attention. The requirements.txt explicitly asks for requests 2.22.0 and urllib3 1.26.5, if that version of requests would not work with that version of urllib3 I would've run into this problem already. Is there something peculiar about your python installation?

Once I understand that, I'll diff 1.25.11 and 1.26.5 and make sure there's no changes that break functionality. I doubt there are but I want to be sure. If there aren't I can loosen the version requirement.

rayelliottdev commented 2 years ago

As far as I know it's the standard python installation that's the default with Raspbian 11.

$ python3 -V
Python 3.9.2

$ pip -V
pip 22.1.1 from /home/pi/temp/YouTube2PeerTube--1/venv/lib/python3.9/site-packages/pip (python 3.9)

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

$ apt list --installed | grep python

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libpython2-stdlib/stable,now 2.7.18-3 armhf [installed,automatic]
libpython2.7-minimal/stable,now 2.7.18-8 armhf [installed,automatic]
libpython2.7-stdlib/stable,now 2.7.18-8 armhf [installed,automatic]
libpython3-dev/stable,now 3.9.2-3 armhf [installed,automatic]
libpython3-stdlib/stable,now 3.9.2-3 armhf [installed,automatic]
libpython3.9-dev/stable,now 3.9.2-1+rpi1 armhf [installed,automatic]
libpython3.9-minimal/stable,now 3.9.2-1+rpi1 armhf [installed,automatic]
libpython3.9-stdlib/stable,now 3.9.2-1+rpi1 armhf [installed,automatic]
libpython3.9/stable,now 3.9.2-1+rpi1 armhf [installed,automatic]
python-apt-common/stable,now 2.2.1 all [installed,automatic]
python-is-python2/stable,now 2.7.18-9 all [installed]
python-pip-whl/stable,now 20.3.4-4+rpt1 all [installed,automatic]
python2-minimal/stable,now 2.7.18-3 armhf [installed,automatic]
python2.7-minimal/stable,now 2.7.18-8 armhf [installed,automatic]
python2.7/stable,now 2.7.18-8 armhf [installed,automatic]
python2/stable,now 2.7.18-3 armhf [installed]
python3-apt/stable,now 2.2.1 armhf [installed,automatic]
python3-colorzero/stable,now 1.1 all [installed,automatic]
python3-debconf/stable,now 1.5.77 all [installed,automatic]
python3-dev/stable,now 3.9.2-3 armhf [installed,automatic]
python3-distutils/stable,now 3.9.2-1 all [installed,automatic]
python3-gpiozero/stable,now 1.6.2-1 all [installed]
python3-greenlet/stable,now 0.4.17-1+b1 armhf [installed,automatic]
python3-lib2to3/stable,now 3.9.2-1 all [installed,automatic]
python3-minimal/stable,now 3.9.2-3 armhf [installed,automatic]
python3-msgpack/stable,now 1.0.0-6 armhf [installed,automatic]
python3-neovim/stable,now 0.4.2-1 all [installed,automatic]
python3-pip/stable,now 20.3.4-4+rpt1 all [installed]
python3-pkg-resources/stable,now 52.0.0-4 all [installed,automatic]
python3-pynvim/stable,now 0.4.2-1 all [installed,automatic]
python3-rpi.gpio/stable,now 0.7.0-0.2+b1 armhf [installed]
python3-setuptools/stable,now 52.0.0-4 all [installed,automatic]
python3-spidev/stable,now 20200602~200721-1 armhf [installed,automatic]
python3-venv/stable,now 3.9.2-3 armhf [installed]
python3-wheel/stable,now 0.34.2-1 all [installed,automatic]
python3.9-dev/stable,now 3.9.2-1+rpi1 armhf [installed,automatic]
python3.9-minimal/stable,now 3.9.2-1+rpi1 armhf [installed,automatic]
python3.9-venv/stable,now 3.9.2-1+rpi1 armhf [installed,automatic]
python3.9/stable,now 3.9.2-1+rpi1 armhf [installed,automatic]
python3/stable,now 3.9.2-3 armhf [installed]

Also, the full output of the install command is

$ pip --no-cache-dir install -r requirements.txt
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting certifi==2019.11.28
  Downloading https://www.piwheels.org/simple/certifi/certifi-2019.11.28-py2.py3-none-any.whl (156 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 156.0/156.0 kB 2.8 MB/s eta 0:00:00
Collecting chardet==3.0.4
  Downloading https://www.piwheels.org/simple/chardet/chardet-3.0.4-py2.py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.4/133.4 kB 17.4 MB/s eta 0:00:00
Collecting feedparser==5.2.1
  Downloading https://www.piwheels.org/simple/feedparser/feedparser-5.2.1-py3-none-any.whl (44 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.7/44.7 kB 31.1 MB/s eta 0:00:00
Collecting idna==2.8
  Downloading https://www.piwheels.org/simple/idna/idna-2.8-py2.py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.6/58.6 kB 20.0 MB/s eta 0:00:00
Collecting pafy==0.5.5
  Downloading https://www.piwheels.org/simple/pafy/pafy-0.5.5-py2.py3-none-any.whl (35 kB)
Collecting requests==2.22.0
  Downloading https://www.piwheels.org/simple/requests/requests-2.22.0-py2.py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.0/58.0 kB 32.0 MB/s eta 0:00:00
Collecting requests-toolbelt==0.9.1
  Downloading https://www.piwheels.org/simple/requests-toolbelt/requests_toolbelt-0.9.1-py2.py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.3/54.3 kB 32.4 MB/s eta 0:00:00
Collecting toml==0.10.0
  Downloading https://www.piwheels.org/simple/toml/toml-0.10.0-py2.py3-none-any.whl (25 kB)
Collecting urllib3==1.26.5
  Downloading https://www.piwheels.org/simple/urllib3/urllib3-1.26.5-py2.py3-none-any.whl (138 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 138.1/138.1 kB 16.0 MB/s eta 0:00:00
Collecting youtube-dl==2019.11.28
  Downloading https://www.piwheels.org/simple/youtube-dl/youtube_dl-2019.11.28-py2.py3-none-any.whl (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 7.4 MB/s eta 0:00:00
INFO: pip is looking at multiple versions of pafy to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of idna to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of feedparser to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of chardet to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of certifi to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.txt (line 6) and urllib3==1.26.5 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested urllib3==1.26.5
    requests 2.22.0 depends on urllib3!=1.25.0, !=1.25.1, <1.26 and >=1.21.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts