Skip to content

Commit f9ef5b3

Browse files
committed
update install instructions in readme
1 parent bbf54db commit f9ef5b3

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

README.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,17 @@ pip install bayesflow
7171

7272
### Backend
7373

74-
First, install one machine learning backend of choice. Note that BayesFlow **will not run** without a backend.
74+
To use BayesFlow, you will also need to install one of the following machine learning backends.
75+
Note that BayesFlow **will not run** without a backend.
7576

7677
- [Install JAX](https://jax.readthedocs.io/en/latest/installation.html)
7778
- [Install PyTorch](https://pytorch.org/get-started/locally/)
7879
- [Install TensorFlow](https://www.tensorflow.org/install)
7980

80-
If you don't know which backend to use, we recommend JAX as it is currently
81-
the fastest backend.
81+
If you don't know which backend to use, we recommend JAX as it is currently the fastest backend.
8282

83-
Once installed, [set the backend environment variable as required by keras](https://keras.io/getting_started/#configuring-your-backend). For example, inside your Python script write:
83+
Once installed, [set the backend environment variable as required by keras](https://keras.io/getting_started/#configuring-your-backend).
84+
For example, inside your Python script write:
8485

8586
```python
8687
import os
@@ -94,31 +95,19 @@ If you use conda, you can alternatively set this individually for each environme
9495
conda env config vars set KERAS_BACKEND=jax
9596
```
9697

97-
This way, you also don't have to manually set the backend every time you are starting Python to use BayesFlow.
98-
99-
**Caution:** Some people report that the IDE (e.g., VSCode or PyCharm) can silently overwrite environment variables. If you have set your backend as an environment variable and you still get keras-related import errors when loading BayesFlow, these IDE shenanigans might be the culprit. Try setting the keras backend in your Python script via `import os; os.environ["KERAS_BACKEND"] = "<YOUR-BACKEND>"`.
100-
101-
### Using pip
102-
103-
You can install the Bayesflow from Github with pip:
98+
Or just plainly set the environment variable in your shell:
10499

105100
```bash
106-
pip install git+https://github.com/bayesflow-org/bayesflow@main
101+
export KERAS_BACKEND=jax
107102
```
108103

109-
### Using Conda
104+
This way, you also don't have to manually set the backend every time you are starting Python to use BayesFlow.
110105

111-
Bayesflow is currently not conda-installable.
106+
**Caution:** Some development environments (e.g., VSCode or PyCharm) can silently overwrite environment variables. If you have set your backend as an environment variable and you still get keras-related import errors when loading BayesFlow, these IDE shenanigans might be the culprit. Try setting the keras backend in your Python script via `import os; os.environ["KERAS_BACKEND"] = "<YOUR-BACKEND>"`.
112107

113108
### From Source
114109

115-
If you want to contribute to BayesFlow, we recommend installing it from source:
116-
117-
```bash
118-
git clone -b main [email protected]:bayesflow-org/bayesflow.git
119-
cd <local-path-to-bayesflow-repository>
120-
conda env create --file environment.yaml --name bayesflow
121-
```
110+
If you want to contribute to BayesFlow, we recommend installing it from source, see [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
122111

123112
## Reporting Issues
124113

0 commit comments

Comments
 (0)