Issue
I am struggling with library installations. I have not received this error before though.
I get a WARNING: Error parsing requirements for numpy: [Errno 2] No such file or directory: This error occurs whether I use Jupyter notebook or terminal.
(base) Geoffrey-MacBook-Pro:~ jeffreyoruru$ pip install petl
Output and Warning
`Requirement already satisfied: petl in ./opt/anaconda3/lib/python3.7/site-packages (1.7.4)
WARNING: Error parsing requirements for numpy: [Errno 2] No such file or directory: '/Users/jeffreyoruru/opt/anaconda3/lib/python3.7/site-packages/numpy-1.19.5.dist-info/METADATA`
Kindly let me know what to do or check.
Solution
I presume you're on a mac, and you used Anaconda to install python.
In case you don't know, if you're using Anaconda/conda then typically you won't use pip
to install packages (likely you're trying above) - but instead you would use conda
.
So above would be conda install perl
.
If you try to use pip instead, you must use the anaconda pip version, and even then you might run into weird problems like above.
Separately as an alternative to Anaconda, you could try a conda-only (so no UI, minimal default install, latest builds of packages, plus some other benefits) 'conda' version called miniforge. (https://github.com/conda-forge/miniforge). If you have an ARM mac, then conda will default to using native M1 ARM binaries for python and packages, rather than x86 versions.
At present, Anaconda will not use or install ARM native binaries.
I use miniforge without problems to install 99.9% of any packages I install, including numpy. Almost all (numpy included) are ARM native code, install without problems and run a lot faster than using the x86 versions and rosetta.
Answered By - Richard
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.