我制作了一个web api,它通过使用c#Process.Start()运行python脚本。该脚本在localhost中工作时没有问题,但一旦我在IIS上部署并发布它,就会从python脚本中得到此错误
line 281, in apply_affine_transform raise ImportError("Image transformations require SciPy. "ImportError: Image transformations require SciPy. Install SciPy.
我通过执行“pip list-v”检查了已安装的模块,果然,已经安装了scipy。然后,我通过cmd执行了脚本,它没有任何问题。我推测,只有通过c#Process.Start()执行python脚本时,才会出现这种情况
注意:错误在另一个导入的模块中抛出,具体如下:
C:\Users\Computer1\AppData\Local\Programs\Python\Python38\lib\site-packages\keras_preprocessing\image\affine_transformations.py\
谁能给我指出正确的方向吗
编辑: 我无法解决这个问题,但我找到了一个涉及anaconda(https://www.anaconda.com/)的解决方法,即使用Process.Start()在conda(base)环境中运行脚本
目前没有回答
相关问题 更多 >
编程相关推荐