Skip to content

Commit 55a9b8e

Browse files
installation in Azure ML guide (#473)
* follow up on open issue on the same topic One MarkDown file describing the neuances of installing within AzureML * Moved file to the docs folder, added pip/conda installation instructions, and converted to rst Signed-off-by: Amit Sharma <[email protected]> Co-authored-by: Amit Sharma <[email protected]>
1 parent 356ebd7 commit 55a9b8e

File tree

2 files changed

+111
-3
lines changed

2 files changed

+111
-3
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ problems
6060
* Helping update the documentation for DoWhy
6161

6262
If you would like to contribute, you can raise a pull request. If you have
63-
questions before contributing, you can start by opening an issue on Github.
63+
questions before contributing, you can start by opening an issue on Github.
+110-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,110 @@
1-
Installation
2-
============
1+
============
2+
Installation
3+
============
4+
5+
Installing with pip
6+
-------------------
7+
8+
DoWhy support Python 3.6+. To install, you can use pip or conda.
9+
10+
**Latest Release**
11+
12+
Install the latest `release <https://pypi.org/project/dowhy/>`__ using pip.
13+
14+
.. code:: shell
15+
16+
pip install dowhy
17+
18+
**Development Version**
19+
20+
If you prefer the latest dev version, clone this repository and run the following command from the top-most folder of
21+
the repository.
22+
23+
.. code:: shell
24+
25+
pip install -e .
26+
27+
**Requirements**
28+
29+
If you face any problems, try installing dependencies manually.
30+
31+
.. code:: shell
32+
33+
pip install -r requirements.txt
34+
35+
Optionally, if you wish to input graphs in the dot format, then install pydot (or pygraphviz).
36+
37+
38+
For better-looking graphs, you can optionally install pygraphviz. To proceed,
39+
first install graphviz and then pygraphviz (on Ubuntu and Ubuntu WSL).
40+
41+
.. code:: shell
42+
43+
sudo apt install graphviz libgraphviz-dev graphviz-dev pkg-config
44+
## from https://github.com/pygraphviz/pygraphviz/issues/71
45+
pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" \
46+
--install-option="--library-path=/usr/lib/graphviz/"
47+
48+
Installing with Conda
49+
---------------------
50+
51+
Install the latest `release <https://anaconda.org/conda-forge/dowhy>`__ using conda.
52+
53+
.. code:: shell
54+
55+
conda install -c conda-forge dowhy
56+
57+
If you face "Solving environment" problems with conda, then try :code:`conda update --all` and then install dowhy. If that does not work, then use :code:`conda config --set channel_priority false` and try to install again. If the problem persists, please add your issue `here <https://github.com/microsoft/dowhy/issues/197>`_.
58+
59+
60+
Installing on Azure Machine Learning
61+
------------------------------------
62+
63+
Eli Y. Kling {https://www.linkedin.com/in/elikling/}
64+
65+
In Azure Machine Learning it is not that straight forward to identify in the terminal window the python (Conda) envornoments used by the notebook. Thus, it is easier to run shell commands from within the notebook. The secret is NOT to use the ! magic but the %.
66+
67+
**Getting the latest release**
68+
69+
In an new python code cell type::
70+
71+
%pip install dowhy
72+
73+
Or::
74+
75+
%pip install --force-reinstall --no-cache-dir dowhy
76+
77+
**Getting the dev version**
78+
79+
a. Open a new terminal window - it will open pointing to your user folder
80+
81+
b. Create a new folder (if you wish - this is not really necessary)::
82+
83+
mkdir pywhy
84+
85+
c. To be really pedantic, ensure it is fully 'activated'::
86+
87+
chmod 777 pywhy
88+
89+
d. Get the full path by::
90+
91+
cd pywhy
92+
pwd
93+
94+
e. Copy that path you will need it later.
95+
96+
f. Clone the repository::
97+
98+
git clone https://github.com/py-why/dowhy
99+
100+
g. Now open a python notebook and create a new python code cell. Type::
101+
102+
%pip install -e <path from step d.>
103+
104+
h. To test the installation::
105+
106+
import dowhy
107+
108+
109+
This should run with no errors.
110+

0 commit comments

Comments
 (0)