ModuleNotFoundError:没有名为“urllib3.packages.six.moves”的模块

问题描述 投票:0回答:1

我在导入请求时遇到错误

我尝试卸载并重新安装以及我在谷歌第一页看到的所有内容,希望获得更多帮助

这两个都是我运行 pip list 时的结果:
六 1.17.0
urllib3 2.2.3

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[3], line 2
      1 import pandas as pd
----> 2 import requests
      3 import numpy as np
      4 import csv

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\__init__.py:43
      1 # -*- coding: utf-8 -*-
      2 
      3 #   __
      4 #  /__)  _  _     _   _ _/   _
      5 # / (   (- (/ (/ (- _)  /  _)
      6 #          /
      8 """
      9 Requests HTTP Library
     10 ~~~~~~~~~~~~~~~~~~~~~
   (...)
     40 :license: Apache 2.0, see LICENSE for more details.
     41 """
---> 43 import urllib3
     44 import chardet
     45 import warnings
...
----> 2 from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
      4 # Base Exceptions
      7 class HTTPError(Exception):

ModuleNotFoundError: No module named 'urllib3.packages.six.moves'
python python-requests urllib3
1个回答
0
投票

类似的问题在here提出,一些用户建议卸载并重新安装

urllib3
six
。尝试一下,如果不起作用,请尝试其他建议的解决方案。请参阅https://github.com/urllib3/urllib3/issues/1518

© www.soinside.com 2019 - 2024. All rights reserved.