twtrubiks / auto_crawler_ptt_beauty_image

Auto Crawler Ptt Beauty Image Use Python Schedule

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation fails due to conflicting urllib3 version

NeolithEra opened this issue · comments

Hi, users are unable to run auto_crawler_ptt_beauty_image due to dependency conflict with urllib3 package.
As shown in the following full dependency graph of auto_crawler_ptt_beauty_image, it directly requires urllib3,while requests==2.21.0 requires urllib3>=1.21.1,<1.25.

According to pip’s “first found wins” installation strategy, urllib3==1.25.3 is the actually installed version. However, urllib3==1.25.3 does not satisfy urllib3>=1.21.1,<1.25.

Dependency tree

auto-crawler-ptt-beauty-image-master
| +-beautifulsoup4(version range:==4.7.0)
| | +-soupsieve(version range:>=1.2)
| +-psycopg2(version range:==2.7.6.1)
| +-requests(version range:==2.21.0)
| | +-certifi(version range:>=2017.4.17)
| | +-chardet(version range:<3.1.0,>=3.0.2)
| | +-idna(version range:>=2.5,<2.9)
| | +-urllib3(version range:>=1.21.1,<1.25)
| +-schedule(version range:==0.5.0)
| +-sqlalchemy(version range:==1.2.15)
| +-urllib3(version range:*)

Solution

Thanks for your help.
Best,
Neolith

Solution

  1. Fix your direct dependency to be urllib3>=1.21.1,<1.25.
    I have checked this revision will not affect your downstream projects now.
  2. Remove your direct dependency urllib3, and use urllib3 transitively introduced by requests.

Which solution do you prefer, 1 or 2?

@twtrubiks Please let me know your choice. I can submit a PR to solve this issue.

@NeolithEra
In fact, you can choose any one, because there is only one function about urllib3.
Just hide some unwanted warnings.
urllib3.disable_warnings()