设置 Python 路径环境变量

用户12308611

我的 Python 程序有问题。在 IDE (spyder IDE) 上运行此程序时,我没有发现任何错误,并且运行良好。否则,如果我在 python IDLE 中运行它,我会收到以下错误。

 RESTART: C:\Users\jeane\Documents\Cours\BSP sem2\TechnicalPart\CNNLuminosity\Serverside\finalCnnOutput.py 
Using TensorFlow backend.
Traceback (most recent call last):
  File "C:\Users\jeane\Documents\Cours\BSP sem2\TechnicalPart\CNNLuminosity\Serverside\finalCnnOutput.py", line 43, in <module>
    test_image = image.load_img('blab-cam' + str(i) + '-snapshots/gallery-images/latest.png', target_size = (64,64))
  File "C:\Users\jeane\AppData\Local\Programs\Python\Python36\lib\site-packages\keras_preprocessing\image\utils.py", line 108, in load_img
    raise ImportError('Could not import PIL.Image. '
ImportError: Could not import PIL.Image. The use of `load_img` requires PIL.

我认为这个错误与 Python 路径环境变量有关,因为我找不到模块。

你必须安装Pil模块。它与python路径无关。

PIL 已被弃用,而枕头是继任者。

pip 安装枕头

更多

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章