我试着用几个模块运行一个python脚本,这个脚本在过去是有效的。一些google搜索建议循环依赖,但这只与两个文件相关,导入模块相互依赖。在
似乎可以归结为scalarmath没有被发现,但我不知道为什么。我的代码只是用于计算的简单函数defs,然后调用这些函数(全部在一个文件中)。在
我的IDE的输出是:C:\Users\sg15\AppData\Local\Continuum\Anaconda2\python.exe "P:/Solid State QT/NSMM/simulations/InteractionsOfTLF.py"
Traceback (most recent call last):
File "P:/Solid State QT/NSMM/simulations/InteractionsOfTLF.py", line 13, in
import matplotlib.pyplot as plt
File "C:\Users\sg15\AppData\Local\Continuum\Anaconda2\lib\site-packages\matplotlib\__init__.py", line 122, in
from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
File "C:\Users\sg15\AppData\Local\Continuum\Anaconda2\lib\site-packages\matplotlib\cbook.py", line 33, in
import numpy as np
File "C:\Users\sg15\AppData\Local\Continuum\Anaconda2\lib\site-packages\numpy\__init__.py", line 185, in
from . import add_newdocs
File "C:\Users\sg15\AppData\Local\Continuum\Anaconda2\lib\site-packages\numpy\add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "C:\Users\sg15\AppData\Local\Continuum\Anaconda2\lib\site-packages\numpy\lib\__init__.py", line 8, in
from .type_check import *
File "C:\Users\sg15\AppData\Local\Continuum\Anaconda2\lib\site-packages\numpy\lib\type_check.py", line 11, in
import numpy.core.numeric as _nx
File "C:\Users\sg15\AppData\Local\Continuum\Anaconda2\lib\site-packages\numpy\core\__init__.py", line 20, in
from . import scalarmath
ImportError: cannot import name scalarmath
Process finished with exit code 1