使用requests
import requests
from PIL import Image
from io import BytesIO
response = requests.get(img_src)
image = Image.open(BytesIO(response.content))
image.show()
使用skimage
安装 pip install scikit-image
from skimage import io
import matplotlib.pylot as plt
image = io.imread(img_src)
plt.imshow(image)
plt.axis('off')
plt.show()