Skip to content

Commit 6ab91fd

Browse files
committed
Update iinstallation docs
1 parent ee5c411 commit 6ab91fd

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

doc/OnlineDocs/getting_started/installation.rst

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,16 @@ packages including but not limited to: matplotlib, networkx, numpy,
5151
openpyxl, pandas, pint, pymysql, pyodbc, pyro4, scipy, sympy, and
5252
xlrd.
5353

54-
A full list of conditional dependencies can be found in Pyomo's
55-
``setup.py`` and displayed using:
54+
A full list of optional dependencies can be found in Pyomo's
55+
``pyproject.toml`` under the ``[project.optional-dependencies]`` table.
56+
They can be displayed by running:
5657

5758
::
5859

60+
# Legacy format
5961
python setup.py dependencies --extra optional
62+
# Newer format - prints as a JSON
63+
python -m pip install --dry-run --report - '.[optional]'
6064

6165
Pyomo extensions that require any of these packages will generate
6266
an error message for missing dependencies upon use.
@@ -86,16 +90,30 @@ initialized.
8690
.. note::
8791
This can only be done via ``pip`` or from source.
8892

89-
Via ``pip``:
93+
Installation via ``pip`` or from source is done the same way - using environment
94+
variables. On Linux/MacOS:
9095

9196
::
9297

93-
pip install pyomo --global-option="--with-cython"
98+
export PYOMO_SETUP_ARGS=--with-cython
99+
pip install pyomo
100+
101+
On Windows:
102+
103+
::
104+
105+
# Via command prompt
106+
set PYOMO_SETUP_ARGS=--with-cython
107+
# Via powershell
108+
$env:PYOMO_SETUP_ARGS="--with-cython"
109+
94110

95111
From source (recommended for advanced users only):
96112

97113
::
98114

115+
export PYOMO_SETUP_ARGS=--with-cython
99116
git clone https://github.com/Pyomo/pyomo.git
100117
cd pyomo
101-
python setup.py install --with-cython
118+
# Use -e to install in editable mode
119+
pip install .

0 commit comments

Comments
 (0)