Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'requests' #5668

Closed
raccoonwannafly opened this issue Jun 1, 2024 · 2 comments
Closed

ModuleNotFoundError: No module named 'requests' #5668

raccoonwannafly opened this issue Jun 1, 2024 · 2 comments

Comments

@raccoonwannafly
Copy link

raccoonwannafly commented Jun 1, 2024

Here's the log when I tried to download (Using Python 3.12.3), tried uninstalling and reinstall requests but still the same error

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "F:\APPS\Python 3.12.3\Scripts\gallery-dl.exe\__main__.py", line 7, in <module>
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gallery_dl\__init__.py", line 289, in main
    status = jobtype(url).run()
             ^^^^^^^^^^^^
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gallery_dl\job.py", line 284, in __init__
    Job.__init__(self, url, parent)
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gallery_dl\job.py", line 39, in __init__
    extr = extractor.find(extr)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gallery_dl\extractor\__init__.py", line 204, in find
    for cls in _list_classes():
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gallery_dl\extractor\__init__.py", line 243, in _list_classes
    for module in _module_iter:
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gallery_dl\extractor\__init__.py", line 252, in _modules_internal
    yield __import__(module_name, globals_, None, (), 1)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gallery_dl\extractor\2ch.py", line 9, in <module>
    from .common import Extractor, Message
  File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gallery_dl\extractor\common.py", line 20, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
@mikf
Copy link
Owner

mikf commented Jun 1, 2024

Did you install gallery-dl with

python3 -m pip install -U -I --no-deps --no-cache-dir https://github.com/mikf/gallery-dl/archive/master.tar.gz

or similar?

If so, drop the --no-deps argument or just run

python3 -m pip install -U requests

to actually install requests.


Also, the latest requests release is causing some issues, so you might want to install "requests<2.32" instead of the latest one at the moment.

@mikf
Copy link
Owner

mikf commented Aug 3, 2024

AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_...

You seem to have installed Python from the Microsoft Store. You should get it from the official source: https://www.python.org/downloads/

@mikf mikf closed this as completed Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants