I want to read one image for the time being before I CNN with keras using my own image.Error message
-------------------------------------------- ------------------------------- ImportError Traceback (most recent call last) <ipython-input-10-40216d0f648d>in<module> 1 import keras 2 from keras.preprocessing.image import array_to_img, img_to_array, load_img ---->3 temp_img = load_img ('RIMG6767.JPG') ~ \ Anaconda3 \ envs \ tensorflow \ lib \ site-packages \ keras_preprocessing \ image.py in load_img (path, grayscale, color_mode, target_size, interpolation) 494 color_mode = 'grayscale' 495 if pil_image is None: ->496 raise ImportError ('Could not import PIL.Image. 497 'The use of `array_to_img` requires PIL.') 498 img = pil_image.open (path) ImportError: Could not import PIL.Image. The use of `array_to_img` requires PIL.</Code></pre> <strong>Applicable source code</strong> <pre><code data-language = "Python">import keras from keras.preprocessing.image import array_to_img, img_to_array, load_img temp_img = load_img ('RIMG6767.JPG')
After confirming that PIL is not installed on the navigator, install Pillow on navigator and succeed.
However, the error has not changed.
Then, when \ Anaconda3 \ envs \ tensorflow \ lib \ site-packages is opened with Explorer, the file of \ PIL and \ Pillow-5.3.0-py3.6.egg-info are confirmed.
I thought PIL wasn't installed ... and opened a terminal
If pip uninstall PIL is typed, it will appear that PIL is not installed.
Just pip uninstal Pillow and uninstall all Pillow.
Download Pillow from the navigator again.
We use Win 10, anaconda navigator to create an environment called tensorflow in addition to root, and work in that environment called tensorflow.
Answer # 1
-no-cache-dir solved it by removing the cache and installing.
- ruby - google map marker cannot be installed (production environment only)
- python - i have pip installed, but i get a command not found error
- python - i want to resolve typeerror: cannot handle this data type: (1, 1, 3), <f8
- python - the numbers read from the file cannot be sorted
- python - i installed linux brew on xserver but no brew
- python - the error "nvrtc_error_compilation (6)" when implementing cupy cannot be avoided
- python - nprandomchoice cannot be used'a' cannot be empty unless no samples are taken even though a is specified
- python 3x - turtle module cannot be imported
- bash_profile: python library dgl cannot be imported due to no path
- python - discordpy cannot judge reaction in 2 steps
- python - cannot use multi-cursor with atom
- python - opencv image cannot be recognized
- some sites cannot be accessed with python's requestsget() function
- python - even though there is no null value, it cannot be executed valueerror: cannot convert non-finite values (na or inf) to
- python - cannot create table with foreignkey in sqlalchemy
- bot of discord created with python cannot be started with terminal
- python - cannot repeatedly select&get excel sheet name on gui
- [pyqt5-python] cannot configure layout: typeerror: argument 1 has unexpected type'qvboxlayout'
- python - cannot extract the character string
- python - cannot download data
- python 3x - the reason that rowspan of grid of tkinter of python is not reflected
- python - i am making a setting part of the function to start automatically, but it does not work
- python managepy runserver unresponsive and __pycache__
- python 3x - pip install mecab-python3 can't
- python 3x - can't run jupyternotebook from anaconda prompt (windows)
- python 3x - reproduction of copy function itself
- python - i want to use tif image data saved on the cloud (onedrive) from a local jupyter notebook
- excel - r'x 'doesn't work
- windows pyreadline has no redisplay
- python - i want to know how to eliminate no module named'flask'