Error

>>> import transformers

Traceback (most recent call last):

File "", line 1, in

File "/usr/local/lib/python3.10/site-packages/transformers/__init__.py", line 30, in

from . import dependency_versions_check

File "/usr/local/lib/python3.10/site-packages/transformers/dependency_versions_check.py", line 41, in

require_version_core(deps[pkg])

File "/usr/local/lib/python3.10/site-packages/transformers/utils/versions.py", line 123, in require_version_core

return require_version(requirement, hint)

File "/usr/local/lib/python3.10/site-packages/transformers/utils/versions.py", line 117, in require_version

_compare_versions(op, got_ver, want_ver, requirement, pkg, hint)

File "/usr/local/lib/python3.10/site-packages/transformers/utils/versions.py", line 45, in _compare_versions

raise ValueError(

ValueError: Unable to compare versions for numpy>=1.17: need=1.17 found=None. This is unusual. Consider reinstalling numpy.

Solution

Resintall numpy and related pakcages. Install it one by one.