Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 我尝试从PIL导入ImageEnhance,但出现了一个操作错误,如何更正?_Python_Image_Import_Python Imaging Library - Fatal编程技术网

Python 我尝试从PIL导入ImageEnhance,但出现了一个操作错误,如何更正?

Python 我尝试从PIL导入ImageEnhance,但出现了一个操作错误,如何更正?,python,image,import,python-imaging-library,Python,Image,Import,Python Imaging Library,守则: from PIL import ImageEnhance 出现以下错误:- OSError Traceback (most recent call last) <ipython-input-24-84203ab35a9e> in <module> ----> 1 from PIL import ImageEnhance ~\Anaconda3\envs\py3env\lib\site-p

守则:

from PIL import ImageEnhance
出现以下错误:-

OSError                                   Traceback (most recent call last)
<ipython-input-24-84203ab35a9e> in <module>
----> 1 from PIL import ImageEnhance

~\Anaconda3\envs\py3env\lib\site-packages\PIL\ImageEnhance.py in <module>
      19 #
      20 
 ---> 21 from . import Image, ImageFilter, ImageStat
      22 
      23 

~\Anaconda3\envs\py3env\lib\site-packages\PIL\ImageFilter.py in <module>
      21 
      22 try:
 ---> 23     import numpy
      24 except ImportError:  # pragma: no cover
      25     numpy = None

~\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py in <module>
      140     from . import _distributor_init
      141 
  --> 142     from . import core
      143     from .core import *
      144     from . import compat

~\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py in <module>
      21             # NOTE: would it change behavior to load ALL
      22             # DLLs at this path vs. the name restriction?
 ---> 23             WinDLL(os.path.abspath(filename))
      24             DLL_filenames.append(filename)
      25     if len(DLL_filenames) > 1:

~\Anaconda3\envs\py3env\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, 
  use_last_error)
      354 
      355         if handle is None:
  --> 356             self._handle = _dlopen(self._name, mode)
      357         else:
      358             self._handle = handle

 OSError: [WinError 193] %1 is not a valid Win32 application
OSError回溯(最近一次调用)
在里面
---->1从PIL导入ImageEnhance
中的~\Anaconda3\envs\py3env\lib\site packages\PIL\ImageEnhance.py
19 #
20
--->21来自。导入图像、ImageFilter、ImageStat
22
23
中的~\Anaconda3\envs\py3env\lib\site packages\PIL\ImageFilter.py
21
22尝试:
--->23进口numpy
24除进口恐怖外:#布拉格语:无封面
25 numpy=无
中的~\AppData\Roaming\Python\Python37\site packages\numpy\\uuuu init\uuuuuu.py
140美元。导入\u分发服务器\u初始化
141
-->142来自。导入核心
143.核心进口*
144来自。进口同胞
中的~\AppData\Roaming\Python\Python37\site packages\numpy\core\\uuuuu init\uuuuuu.py
21#注意:加载所有
22#此路径上的DLL与名称限制?
--->23 Windell(os.path.abspath(文件名))
24 DLL_文件名。追加(文件名)
25如果len(DLL_文件名)>1:
~\Anaconda3\envs\py3env\lib\ctypes\\uuuuu init\uuuuu.py in\uuuu init\uuuuu(self,name,mode,handle,use\u errno,
使用(上次错误)
354
355如果句柄为“无”:
-->356 self.\u handle=\u dlopen(self.\u名称,模式)
357其他:
358自身.\u手柄=手柄
OSError:[WinError 193]%1不是有效的Win32应用程序

导入模块
numpy
似乎有问题-您是否安装了模块
numpy
?请指定详细信息以重现错误?操作系统、安装步骤、版本等。