Skip to content

Commit f697791

Browse files
authored
Merge pull request Pyomo#3208 from mrmundt/document-cython
Update installation documentation to include Cython instructions
2 parents 39e8a72 + 399cbf5 commit f697791

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

Diff for: doc/OnlineDocs/installation.rst

+30-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ version, Pyomo will remove testing for that Python version.
1212
Using CONDA
1313
~~~~~~~~~~~
1414

15-
We recommend installation with *conda*, which is included with the
15+
We recommend installation with ``conda``, which is included with the
1616
Anaconda distribution of Python. You can install Pyomo in your system
1717
Python installation by executing the following in a shell:
1818

@@ -21,7 +21,7 @@ Python installation by executing the following in a shell:
2121
conda install -c conda-forge pyomo
2222

2323
Optimization solvers are not installed with Pyomo, but some open source
24-
optimization solvers can be installed with conda as well:
24+
optimization solvers can be installed with ``conda`` as well:
2525

2626
::
2727

@@ -31,7 +31,7 @@ optimization solvers can be installed with conda as well:
3131
Using PIP
3232
~~~~~~~~~
3333

34-
The standard utility for installing Python packages is *pip*. You
34+
The standard utility for installing Python packages is ``pip``. You
3535
can install Pyomo in your system Python installation by executing
3636
the following in a shell:
3737

@@ -43,14 +43,14 @@ the following in a shell:
4343
Conditional Dependencies
4444
~~~~~~~~~~~~~~~~~~~~~~~~
4545

46-
Extensions to Pyomo, and many of the contributions in `pyomo.contrib`,
46+
Extensions to Pyomo, and many of the contributions in ``pyomo.contrib``,
4747
often have conditional dependencies on a variety of third-party Python
4848
packages including but not limited to: matplotlib, networkx, numpy,
4949
openpyxl, pandas, pint, pymysql, pyodbc, pyro4, scipy, sympy, and
5050
xlrd.
5151

5252
A full list of conditional dependencies can be found in Pyomo's
53-
`setup.py` and displayed using:
53+
``setup.py`` and displayed using:
5454

5555
::
5656

@@ -72,3 +72,28 @@ with the standard Anaconda installation.
7272
You can check which Python packages you have installed using the command
7373
``conda list`` or ``pip list``. Additional Python packages may be
7474
installed as needed.
75+
76+
77+
Installation with Cython
78+
~~~~~~~~~~~~~~~~~~~~~~~~
79+
80+
Users can opt to install Pyomo with
81+
`cython <https://cython.readthedocs.io/en/latest/src/tutorial/cython_tutorial.html>`_
82+
initialized.
83+
84+
.. note::
85+
This can only be done via ``pip`` or from source.
86+
87+
Via ``pip``:
88+
89+
::
90+
91+
pip install pyomo --global-option="--with-cython"
92+
93+
From source (recommended for advanced users only):
94+
95+
::
96+
97+
git clone https://github.com/Pyomo/pyomo.git
98+
cd pyomo
99+
python setup.py install --with-cython

0 commit comments

Comments
 (0)