Шаги по воспроизведению:
< ul>
[*]Создал venv с использованием Python 3.10.11
[*]Установил numpy 2.1.2 через pip
[*]Восстановил venv в то же место с использованием Python 3.12.7
[*]Пыталась переустановить numpy 2.1.2 через pip, но pip сказал, что она уже установлена
[*]Выполнил команду import numpy как np в venv
Результирующая ошибка (из numpy):
Код: Выделить всё
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
Подробнее здесь: https://stackoverflow.com/questions/791 ... -an-existi