在非包装中尝试相对导入可选包

时间:2016-10-24 07:43:35

标签: python package

我试图跑:

import numpy as np
from dipy.reconst.multi_voxel import multi_voxel_fit
from dipy.reconst.base import ReconstModel, ReconstFit
from scipy.special import hermite, gamma
from scipy.misc import factorial, factorial2
import dipy.reconst.dti as dti
from warnings import warn
from dipy.core.gradients import gradient_table
from ..utils.optpkg import optional_package

cvxopt, have_cvxopt, _ = optional_package("cvxopt")

但是它给出了ValueERROR:ValueError:在非包中尝试相对导入 谢谢!

0 个答案:

没有答案