brightway-lca / brightway25

A wrapper library for documentation and easy installation of Brightway 2.5
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

bw2io.bw2setup() error on osx-arm64 #5

Open Phurga opened 12 months ago

Phurga commented 12 months ago

Hello,

I am trying to run the ecoinvent import example from brightway documentation on my m2 mac (https://docs.brightway.dev/en/latest/content/examples/brightway-examples/data_import/ecoinvent_import.html)

I am using this library: brightway25_nosolver version 1.0.6 build py_4 (following the installation instructions)

Calling bw2io.bw2setup() raises the following error:

_"AttributeError: 'Config' object has no attribute 'istest'" (full error code is attached below)

It looks like the Config class indeed does not have

I have tested with previous builds and still have errors, I have done a clean reinstall of my environments (including conda resinstalls through mambaforge since anaconda did not work out)

Many thanks in advance! Adrien

Below the full error code:

AttributeError Traceback (most recent call last) Cell In[14], line 3 (...) ----> 3 bw2io.bw2setup() (...)

File /opt/homebrew/Caskroom/mambaforge/base/envs/bw25ns/lib/python3.11/site-packages/bw2io/init.py:150, in bw2setup() 148 return 149 print("Creating default biosphere\n") --> 150 create_default_biosphere3() 151 print("Creating default LCIA methods\n") 152 create_default_lcia_methods()

File /opt/homebrew/Caskroom/mambaforge/base/envs/bw25ns/lib/python3.11/site-packages/bw2io/init.py:112, in create_default_biosphere3(overwrite) 110 eb = Ecospold2BiosphereImporter() 111 eb.apply_strategies() --> 112 eb.write_database(overwrite=overwrite)

File /opt/homebrew/Caskroom/mambaforge/base/envs/bw25ns/lib/python3.11/site-packages/bw2io/importers/base_lci.py:278, in LCIImporter.write_database(self, data, delete_existing, backend, activate_parameters, db_name, searchable, **kwargs) 275 self.write_database_parameters(activate_parameters, delete_existing) ... 466 index, key, ds, exchanges, activities 467 ) 469 if activities:

Phurga commented 12 months ago

Reproduced on a windows machine on the latest build.

tngTUDOR commented 11 months ago

@Phurga , can you please give the exact version of bwio you have?

import bw2io as bi
print(bi.__version__)
Phurga commented 11 months ago

@Phurga , can you please give the exact version of bwio you have?

import bw2io as bi
print(bi.__version__)

(0, 9, 'DEV21')

cmutel commented 11 months ago

Sorry about this, I prematurely merged code incorporating https://github.com/brightway-lca/bw_projects, but this was premature. Please install bw2data 4.0.dev29 from the conda channel cmutel or from pypi, this should fix things.

Phurga commented 11 months ago

Excellent, I now have a working environment!! Many thanks @cmutel :)