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
ornumpy‑1.21.2+mkl‑cp310‑cp310‑win32.whl
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 versionspy -0
Use a specified versionpy -3.9
e.g. 1
Create a virtual environment using python 3.9py -3.9 venv .venv
e.g. 2
install matplotlib with pip using python 3.9py -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:-
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.Run
poetry lock
to update poetry.lock file(contains details information about the library)Run
poetry install
again, & it should work fine.
I`ll try to answer it.
Related Topics
Hide Chromedriver Console in Python
Numpy Argsort - What Is It Doing
Python, Default Keyword Arguments After Variable Length Positional Arguments
Numpy Version of "Exponential Weighted Moving Average", Equivalent to Pandas.Ewm().Mean()
Getting Gradient of Model Output W.R.T Weights Using Keras
SQL Alchemy Orm Returning a Single Column, How to Avoid Common Post Processing
Loading Initial Data with Django 1.7 and Data Migrations
Getting Processor Information in Python
Using Python Requests: Sessions, Cookies, and Post
Make Part of a Matplotlib Title Bold and a Different Color
What's the Best Way to Store a Phone Number in Django Models
How to Access Class Member Variables in Python
Python and Operator on Two Boolean Lists - How
In-Place Type Conversion of a Numpy Array
When to Use Get, Get_Queryset, Get_Context_Data in Django
In Python, What Happens When You Import Inside of a Function