无法再导入 Brightway2 - ImportError
cannot anymore import Brightway2 - ImportError
我尝试像往常一样导入 brightway2 并且它起作用了,但现在它不再起作用并得到一个:
ImportError: cannot import name 'databases'
我没有做任何更改,我尝试删除 conda 并再次安装,但同样的错误...有什么想法吗?
import brightway2 as bw
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-a3ddbb8a34e8> in <module>
----> 1 import brightway2 as bw
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\brightway2\__init__.py in <module>
1 # -*- coding: utf-8 -*
----> 2 from bw2data import *
3 from bw2calc import *
4 from bw2io import *
5
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\__init__.py in <module>
33 from .project import projects
34 from .utils import set_data_dir
---> 35 from .meta import (
36 dynamic_calculation_setups,
37 calculation_setups,
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\meta.py in <module>
190 preferences = Preferences()
191 weightings = WeightingMeta()
--> 192 calculation_setups = CalculationSetups()
193 dynamic_calculation_setups = DynamicCalculationSetups()
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\serialization.py in __init__(self, dirpath)
120 self.filename
121 )
--> 122 self.load()
123
124 def load(self):
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\serialization.py in load(self)
125 """Load the serialized data. Creates the file if not yet present."""
126 try:
--> 127 self.data = self.deserialize()
128 except IOError:
129 # Create if not present
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\serialization.py in deserialize(self)
238
239 def deserialize(self):
--> 240 return self.unpack(pickle.load(open(self.filepath, "rb")))
241
242
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\backends\__init__.py in <module>
3 from eight import *
4
----> 5 from .base import LCIBackend
6 from .peewee import SQLiteBackend
7 from .json import JSONDatabase
还有什么东西不见了?
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\backends\base.py in <module>
3 from eight import *
4
----> 5 from .. import (
6 config,
7 databases,
ImportError: cannot import name 'databases'
这是一个错误,将会 fixed in an upcoming release。暂时需要删除文件:
C:\Documents and Settings\<User>\Application Data\Local Settings\pylca\Brightway3\<default-something>\setups.pickle
我尝试像往常一样导入 brightway2 并且它起作用了,但现在它不再起作用并得到一个:
ImportError: cannot import name 'databases'
我没有做任何更改,我尝试删除 conda 并再次安装,但同样的错误...有什么想法吗?
import brightway2 as bw
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-a3ddbb8a34e8> in <module>
----> 1 import brightway2 as bw
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\brightway2\__init__.py in <module>
1 # -*- coding: utf-8 -*
----> 2 from bw2data import *
3 from bw2calc import *
4 from bw2io import *
5
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\__init__.py in <module>
33 from .project import projects
34 from .utils import set_data_dir
---> 35 from .meta import (
36 dynamic_calculation_setups,
37 calculation_setups,
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\meta.py in <module>
190 preferences = Preferences()
191 weightings = WeightingMeta()
--> 192 calculation_setups = CalculationSetups()
193 dynamic_calculation_setups = DynamicCalculationSetups()
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\serialization.py in __init__(self, dirpath)
120 self.filename
121 )
--> 122 self.load()
123
124 def load(self):
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\serialization.py in load(self)
125 """Load the serialized data. Creates the file if not yet present."""
126 try:
--> 127 self.data = self.deserialize()
128 except IOError:
129 # Create if not present
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\serialization.py in deserialize(self)
238
239 def deserialize(self):
--> 240 return self.unpack(pickle.load(open(self.filepath, "rb")))
241
242
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\backends\__init__.py in <module>
3 from eight import *
4
----> 5 from .base import LCIBackend
6 from .peewee import SQLiteBackend
7 from .json import JSONDatabase
还有什么东西不见了?
D:\Users\gressetbourgeoismat\Documents\Portable\miniconda\envs\bw6\lib\site-packages\bw2data\backends\base.py in <module>
3 from eight import *
4
----> 5 from .. import (
6 config,
7 databases,
ImportError: cannot import name 'databases'
这是一个错误,将会 fixed in an upcoming release。暂时需要删除文件:
C:\Documents and Settings\<User>\Application Data\Local Settings\pylca\Brightway3\<default-something>\setups.pickle