大家! 我遇到了一个问题“ ModuleNotFoundError:没有名为“ atomate”的模块” 错误如下所示,
Traceback (most recent call last):
File "/home/user/app/anaconda3/bin/rlaunch", line 8, in <module>
sys.exit(rlaunch())
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/scripts/rlaunch_run.py", line 141, in rlaunch
timeout=args.timeout, local_redirect=args.local_redirect)
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/core/rocket_launcher.py", line 98, in rapidfire
while (skip_check or launchpad.run_exists(fworker)) and time_ok():
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/core/launchpad.py", line 781, in run_exists
return bool(self._get_a_fw_to_run(query=q, checkout=False))
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/core/launchpad.py", line 1078, in _get_a_fw_to_run
m_fw = self.get_fw_by_id(m_fw['fw_id'])
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/core/launchpad.py", line 529, in get_fw_by_id
return Firework.from_dict(self.get_fw_dict_by_id(fw_id))
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 157, in _decorator
new_args[0] = {k: _recursive_load(v) for k, v in args[0].items()}
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 157, in <dictcomp>
new_args[0] = {k: _recursive_load(v) for k, v in args[0].items()}
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 118, in _recursive_load
return {k: _recursive_load(v) for k, v in obj.items()}
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 118, in <dictcomp>
return {k: _recursive_load(v) for k, v in obj.items()}
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 121, in _recursive_load
return [_recursive_load(v) for v in obj]
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 121, in <listcomp>
return [_recursive_load(v) for v in obj]
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 113, in _recursive_load
return load_object(obj)
File "/home/user/app/anaconda3/lib/python3.7/site-packages/fireworks/utilities/fw_serializers.py", line 332, in load_object
mod = __import__(modname, globals(), locals(), [classname], 0)
ModuleNotFoundError: No module named 'atomate'
另一个奇怪的是,我成功导入了它。
(firework) [user@master test_c]$ python
Python 3.7.7 (default, May 6 2020, 10:21:04)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import atomate
>>>
代码是:
import numpy as np
from pymatgen import Structure
from fireworks import LaunchPad
from atomate.vasp.workflows.presets.core import wf_bandstructure
from atomate.vasp.powerups import add_modify_incar
struct = Structure.from_file('POSCAR') # note: many file formats supported, see function docs
wf = wf_bandstructure(struct)
lpad = LaunchPad.auto_load() # loads this based on the FireWorks configuration
lpad.add_wf(wf)
那是什么问题?我该怎么解决