0

The default directory in which Brightway stores projects and all associated components is determined by appdirs. Indeed, in bw2data.projects, the project directory is set as:

data_dir = appdirs.user_data_dir(LABEL, "pylca")

For example, for my Windows install , this is C:\users\me\AppData\Local\pylca\Brightway3.

I would like for one of my projects to be on an external network-based disk. This is for a used project, not just for cold storage. Is there functionality within Brightway to change the location of a project?

MPa
  • 1,086
  • 1
  • 10
  • 25
  • You can solve your problem by setting the `BRIGHTWAY2_DIR` environment variable. The page in the documentation [Setting BRIGHTWAY2_DIR in a virtual environment](https://docs.brightwaylca.org/faq.html#setting-brightway2-dir-in-a-virtual-environment) explains very well how to do it. – Giuseppe Cardellini Mar 13 '18 at 06:36

1 Answers1

0

As an alternative procedure if you want to change BRIGHTWAY2_DIR in Python, this works:

import os
os.environ['BRIGHTWAY2_DIR']='path/to/my/other/dir'
from brightway2 import *

Despite interesting leads such as this one on reload, I have been unable to make this work if there was a brightway2 import before setting the BRIGHTWAY2_DIR environment variable.

MPa
  • 1,086
  • 1
  • 10
  • 25