我在导入请求时遇到错误
我尝试卸载并重新安装以及我在谷歌第一页看到的所有内容,希望获得更多帮助
这两个都是我运行 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'
类似的问题在here提出,一些用户建议卸载并重新安装
urllib3
和six
。尝试一下,如果不起作用,请尝试其他建议的解决方案。请参阅https://github.com/urllib3/urllib3/issues/1518