Numpy 1.21.2 May Not Yet Support Python 3.10

NumPy 1.21.2 may not yet support Python 3.10

If on Windows, numpy has not yet released a precompiled wheel for Python 3.10. However you can try the unofficial wheels available at https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy .
Specifically look for

  • numpy‑1.21.2+mkl‑cp310‑cp310‑win_amd64.whl or
  • numpy‑1.21.2+mkl‑cp310‑cp310‑win32.whl

depending on you system architecture.

After downloading the file go to the download directory and run pip install "<filename>.whl".)

(I have personally installed numpy‑1.21.2+mkl‑cp310‑cp310‑win_amd64.whl and it worked for me.)

Installing numpy 1.21.0 or earlier

Solved this by downgrading to Python 3.6 (completely uninstalling Python 3.10) and using this to install Pandas 1.19.5 via pip.

Pip cannot install anything after upgrading to Python 3.10.0 on windows

Try to upgrade your pip

pip install --upgrade pip

Can't install Matplotlib on Python 3.10 after its release (2021-10-05)

As others have stated, Python 3.10 is not currently compatible with Matplotlib.
You need to install and use Python 3.9 until it is supported. Until then you have a few options:

Windows

You can use the Python Launcher for Windows (py.exe) script to choose which Python version to run like so:

py.exe script help:
py -h

List all installed versions
py -0

Use a specified version
py -3.9

e.g. 1
Create a virtual environment using python 3.9
py -3.9 venv .venv

e.g. 2
install matplotlib with pip using python 3.9
py -3.9 -m pip install matplotlib

Linux

On Linux you can run whatever Python version you like like so:

python3.9

You can set up a local (your working directory and all sub-directories) virtual environment that will use your specified version like so:

python3.9 -m venv .venv

Which will set the version of python used to 3.9 while in the local directory, and allow you to type python instead of python3.9 each time you need it.

Another relevant and helpful post by Rotareti here.

Please note that I have not described how to activate and use Python Virtual Environments here in detail, for more information on using them read the python docs.

Reference this answer if you're interested in installing a matplotlib release candidate.

ERROR: Failed building wheel for numpy , ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

I solved it by doing the following steps:-

  1. I updated the pyproject.toml(This file contains all the library/dependency/dev dependency)with the numpy version that I installed using pip install numpy command.
    Sample Image

  2. Run poetry lock to update poetry.lock file(contains details information about the library)
    Sample Image

  3. Run poetry install again, & it should work fine.

If you are having any problems, you can comment.
I`ll try to answer it.



Related Topics



Leave a reply



Submit