Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
Importando imagen a python: no se puede importar el nombre 'imread'

Soy nuevo en Python y quiero importar una imagen.

 import numpy as np from scipy.misc import imread, imsave, imresize # Read an JPEG image into a numpy array img = imread('Cover.jpg') print(img.dtype, img.shape)

pero me enfrento al siguiente error: cannot import name 'imread' . Ya instalé correctamente numpy y scipy.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

También necesita instalar PIL (almohada), ya que eso es lo que scipy usa para leer imágenes:

 pip install Pillow

nota de los documentos :

imread utiliza la biblioteca de imágenes de Python (PIL) para leer una imagen. Las siguientes notas son de la documentación PIL.

sin embargo, es posible que desee pensar en cambiar a scipy.imageio.imread ya que scipy.misc.imread está obsoleto :

imread está en desuso! imread está obsoleto en SciPy 1.0.0 y se eliminará en 1.2.0. Utilice imageio.imread en su lugar

over 4 years ago · Santiago Trujillo Report

0

Usar:

 from imageio import imread

funcionó para mí

over 4 years ago · Santiago Trujillo Report

0

Primero, debe tener Pillow, luego su versión de scipy debe ser inferior a 1.1.0

 pip install Pillow pip install scipy==1.1.0
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!