Перестал работать импорт pandas

Рейтинг: -1Ответов: 1Опубликовано: 15.02.2023

Ранее все работало. Воспроизводится только на одном компе. Гугление не помогает. Версии питона и пандас обновлял, откатывал. Не помогает. При чем тут json?

  • Python 3.9.13
  • pandas 1.3.2

при импорте библиотеки import pandas as pd получаю ошибку:

c:\test>ahanter3.py
<class 'str'>
{"page": 2, "per_page": 6, "total": 12, "total_pages": 2, "data": [{"id": 7, "email": "michael.lawson@reqres.in", "first_name": "Michael", "last_name": "Lawson", "avatar": "https://reqres.in/img/faces/7-image.jpg"}, {"id": 8, "email": "lindsay.ferguson@reqres.in", "first_name": "Lindsay", "last_name": "Ferguson", "avatar": "https://reqres.in/img/faces/8-image.jpg"}, {"id": 9, "email": "tobias.funke@reqres.in", "first_name": "Tobias", "last_name": "Funke", "avatar": "https://reqres.in/img/faces/9-image.jpg"}, {"id": 10, "email": "byron.fields@reqres.in", "first_name": "Byron", "last_name": "Fields", "avatar": "https://reqres.in/img/faces/10-image.jpg"}, {"id": 11, "email": "george.edwards@reqres.in", "first_name": "George", "last_name": "Edwards", "avatar": "https://reqres.in/img/faces/11-image.jpg"}, {"id": 12, "email": "rachel.howell@reqres.in", "first_name": "Rachel", "last_name": "Howell", "avatar": "https://reqres.in/img/faces/12-image.jpg"}], "support": {"url": "https://reqres.in/#support-heading", "text": "To keep ReqRes free, contributions towards server costs are appreciated!"}}
<class 'dict'>
{'page': 2, 'per_page': 6, 'total': 12, 'total_pages': 2, 'data': [{'id': 7, 'email': 'michael.lawson@reqres.in', 'first_name': 'Michael', 'last_name': 'Lawson', 'avatar': 'https://reqres.in/img/faces/7-image.jpg'}, {'id': 8, 'email': 'lindsay.ferguson@reqres.in', 'first_name': 'Lindsay', 'last_name': 'Ferguson', 'avatar': 'https://reqres.in/img/faces/8-image.jpg'}, {'id': 9, 'email': 'tobias.funke@reqres.in', 'first_name': 'Tobias', 'last_name': 'Funke', 'avatar': 'https://reqres.in/img/faces/9-image.jpg'}, {'id': 10, 'email': 'byron.fields@reqres.in', 'first_name': 'Byron', 'last_name': 'Fields', 'avatar': 'https://reqres.in/img/faces/10-image.jpg'}, {'id': 11, 'email': 'george.edwards@reqres.in', 'first_name': 'George', 'last_name': 'Edwards', 'avatar': 'https://reqres.in/img/faces/11-image.jpg'}, {'id': 12, 'email': 'rachel.howell@reqres.in', 'first_name': 'Rachel', 'last_name': 'Howell', 'avatar': 'https://reqres.in/img/faces/12-image.jpg'}], 'support': {'url': 'https://reqres.in/#support-heading', 'text': 'To keep ReqRes free, contributions towards server costs are appreciated!'}}
Traceback (most recent call last):
  File "C:\test\ahanter3.py", line 3, in <module>
    import pandas as pd
  File "C:\Users\Администратор\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\__init__.py", line 11, in <module>
    __import__(dependency)
  File "C:\Users\Администратор\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py", line 139, in <module>
    vinfo = get_versions()
  File "C:\Users\Администратор\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\_version.py", line 21, in get_versions
    return json.loads(version_json)
AttributeError: module 'json' has no attribute 'loads'

Ответы

▲ 0

json.py мой другой скрипт лежал в той же директории. Спасибо всем за помощь.