Skip to content

ModuleNotFoundError: No module named 'urllib2' #183

Closed

Description

@mmmikko

Is there some easy way that I could try to fix this issue and make a PR?

Activity

  1. josegonzalez commented on Oct 18, 2021

    @josegonzalez
    Owner

    Basically all MRs welcome. This might be a python2 vs python3 thing.

  2. matkoniecz commented on Nov 2, 2021

    @matkoniecz

    Is this script supposed to be python3 or python2? Or is it supporting both?

  3. josegonzalez commented on Nov 4, 2021

    @josegonzalez
    Owner

    Both if possible.

  4. matkoniecz commented on Nov 22, 2021

    @matkoniecz

    https://github.com/josegonzalez/python-github-backup/blob/master/requirements.txt is not listing it

    Note that

    The urllib2 module has been split across several modules in Python 3 named urllib.request and urllib.error. The 2to3 tool will automatically adapt imports when converting your sources to Python 3.

    https://docs.python.org/2.7/library/urllib2.html

    Given that python2 is EOLed maybe it would be better to supporting just Python3?

  5. Iamrodos commented on Nov 29, 2025

    @Iamrodos
    Contributor

    @josegonzalez I think this can be closed.

    Python 2 support was dropped years ago, and as of commit 875e318 (PR #442), only Python 3.10+ is supported. The urllib2 module no longer exists in the codebase, urllib is used from the standard library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions