有个python小问题向您请教一下~
我通过conda根据要求安装了一个虚拟环境,在conda中去运行对应的python文件,可以正常执行。
但是我需要用java调用python,所以需要在命令行中调用这个python。
【问题是:】conda中能够正常执行的程序在cmd中不能够正常执行。一直提示导包错误
C:\Users\Admin\Desktop\beta_v32\beta_v3>python main.py Traceback (most recent call last): File "main.py", line 25, in <module> import rectification as rect File "C:\Users\Admin\Desktop\beta_v32\beta_v3\rectification.py", line 1, in <module> from skimage import feature, color, transform, io File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\skimage\feature\__init__.py", line 3, in <module> from ._canny import canny File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\skimage\feature\_canny.py", line 18, in <module> from ..filters import gaussian File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\skimage\filters\__init__.py", line 4, in <module> from .edges import (sobel, sobel_h, sobel_v, File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\skimage\filters\edges.py", line 18, in <module> from ..restoration.uft import laplacian File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\skimage\restoration\__init__.py", line 5, in <module> from .deconvolution import wiener, unsupervised_wiener, richardson_lucy File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\skimage\restoration\deconvolution.py", line 6, in <module> from scipy.signal import convolve File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\scipy\signal\__init__.py", line 299, in <module> from .filter_design import * File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\scipy\signal\filter_design.py", line 17, in <module> from scipy import special, optimize, fft as sp_fft File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\scipy\optimize\__init__.py", line 387, in <module> from .optimize import * File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\scipy\optimize\optimize.py", line 36, in <module> from ._numdiff import approx_derivative File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\scipy\optimize\_numdiff.py", line 6, in <module> from scipy.sparse.linalg import LinearOperator File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\scipy\sparse\linalg\__init__.py", line 114, in <module> from .eigen import * File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\scipy\sparse\linalg\eigen\__init__.py", line 9, in <module> from .arpack import * File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\scipy\sparse\linalg\eigen\arpack\__init__.py", line 20, in <module> from .arpack import * File "D:\ProgramFiles\Anaconda\envs\python36\lib\site-packages\scipy\sparse\linalg\eigen\arpack\arpack.py", line 43, in <module> from . import _arpack ImportError: DLL load failed: 找不到指定的程序。
尝试:
conda install mkl