Se lanzó Python 3.10 y cuando intento instalar NumPy me da esto: NumPy 1.21.2 may not yet support Python 3.10. . ¿Qué tengo que hacer?
Si está en Windows, numpy aún no ha lanzado una rueda precompilada para Python 3.10. Sin embargo, puede probar las ruedas no oficiales disponibles en https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy . buscar específicamente
numpy‑1.21.2+mkl‑cp310‑cp310‑win_amd64.whl onumpy‑1.21.2+mkl‑cp310‑cp310‑win32.whldependiendo de la arquitectura de su sistema.
Después de descargar el archivo, vaya al directorio de descarga y ejecute pip install "<filename>.whl" .)
(Personalmente instalé numpy‑1.21.2+mkl‑cp310‑cp310‑win_amd64.whl y funcionó para mí).
Dado que está en MS-Windows, también puede utilizar pipwin : esta utilidad solo para Windows se puede instalar mediante pip y puede descargar e instalar una serie de compilaciones "no oficiales" (proporcionadas por el excelente Christoph Gohlke) de Scientific de https:// www.lfd.uci.edu/~gohlke/pythonlibs/ pero elimina las conjeturas sobre qué archivo(s) descargar e instalar.
Una sesión podría ejecutarse:
pip install pipwin pipwin install numpy Alternativamente, podría usar el lanzador py como en:
py -3.10 -mpip install pipwin py -3.10 -mpipwin refresh py -3.10 -mpipwin install numpyEl paso intermedio le dice a pipwin que complete su lista de lo que está disponible actualmente.
Si no le importa usar Docker y Debian, el contenedor acoplable oficial python:3.10 (== python:3.10-bullseye ) tiene pip preinstalado. Y algunos paquetes como numpy pueden instalarse usando pip install y ejecutarse bajo python 3.10 (aunque buena suerte con otros paquetes :).
Aquí hay algunos PoC y pruebas de que numpy realmente funciona allí:
$ docker run -it --rm --name python310 -u 0 python:3.10 bash -c 'pip --version; pip install numpy --user --no-cache; pip show numpy; python -c "import numpy as np; print(np.ones(5))"'..que debería generar:
pip 21.2.4 from /usr/local/lib/python3.10/site-packages/pip (python 3.10) Collecting numpy Downloading numpy-1.21.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB) |████████████████████████████████| 15.9 MB 36.9 MB/s Installing collected packages: numpy WARNING: The scripts f2py, f2py3 and f2py3.10 are installed in '/root/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed numpy-1.21.4 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available. You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. Name: numpy Version: 1.21.4 Summary: NumPy is the fundamental package for array computing with Python. Home-page: https://www.numpy.org Author: Travis E. Oliphant et al. Author-email: License: BSD Location: /root/.local/lib/python3.10/site-packages Requires: Required-by: [1. 1. 1. 1. 1.]