Unable to import transformers: ImportError: numpy>=1.17 is required for a normal functioning of this module, but found numpy==1.16.3
See original GitHub issueI’d installed transformers via pip install transformers
And made sure my python packages is up-to-date, however when I import transformers it shows the error message:
ImportError: numpy>=1.17 is required for a normal functioning of this module, but found numpy==1.16.3.
Try: pip install transformers -U or pip install -e '.[dev]' if you're working with git master
I’d made sure my numpy is version 1.20.1, and I’d tried as suggested in the message: pip install transformers -U
But it doesn’t work. Please help me how could I import the package, thank you!
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Import issue while using the python setuptools library
ImportError : numpy>=1.17 is required for a normal functioning of this module, but found numpy==1.16.5. Try: pip install transformers -U or ...
Read more >Problem installing using conda - Hugging Face Forums
I'm trying to install transformers and datasets package using conda. I installed pytorch using conda, and I'm using miniconda with python ...
Read more >2022 How to Fix ImportError "No Module Named Numpy" Error ...
2022 How to Fix "No Module Named Numpy" Error in Python! How to fix the error in PyCharm and running scripts from command...
Read more >python ImportError: No module named numpy - YouTube
python ImportError : No module named numpysudo pip install numpysudo pip3 install numpysudo apt-get install python3-pipPython Tutorials ...
Read more >fullresults.2013-05-13.txt - debian.org Developers LDAP Search
Posix' could not be found avalon-framework 4.2.0-9 OK ... cloud-init 0.7.1-3 Failed [PYTHON_TRACEBACK/PYIMPORT] ImportError: No module named setuptools ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Your second instruction works! It seems force-install may install all dependencies for transformer, but I still don’t know why it couldn’t run with the default numpy = 1.20.0
Thank you for your help!
Probably your environments have different versions as @LysandreJik mentioned. Can you run the following command where you get the error message (your working environment), and assure you have the correct numpy version.
You may try the following, but without locating your correct environment these probably do not help much.