Skip to content

Commit

Permalink
update installation docs: demonstrate new pip option
Browse files Browse the repository at this point in the history
  • Loading branch information
rfeinman committed Sep 27, 2022
1 parent 751e5b0 commit cb80c86
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ __Solvers:__ BFGS, L-BFGS, Conjugate Gradient (CG), Newton Conjugate Gradient (N

__Examples:__ See the [Rosenbrock minimization notebook](https://github.com/rfeinman/pytorch-minimize/blob/master/examples/rosen_minimize.ipynb) for a demonstration of function minimization with a handful of different algorithms.

__Install:__
__Install with pip:__

pip install pytorch-minimize

__Install from source:__

git clone https://github.com/rfeinman/pytorch-minimize.git
cd pytorch-minimize
Expand Down
14 changes: 10 additions & 4 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
Install
===========

To install pytorch-minimize, first clone the repository to a location of your choice::
To install pytorch-minimize, users may either 1) install the official PyPI release via pip, or 2) install a *bleeding edge* distribution from source.

git clone https://github.com/rfeinman/pytorch-minimize.git

Next, cd to the root directory and install the package with pip::
**Install via pip (official PyPI release)**::

pip install pytorch-minimize

**Install from source (bleeding edge)**::

# clone the latest master to any location
git clone https://github.com/rfeinman/pytorch-minimize.git

# cd to the root directory and install the package with pip
cd pytorch-minimize
pip install -e .

Once these steps have been completed, you should be able to make inports such as ``from torchmin import minimize`` from any location on your machine.

**PyTorch requirement**

Expand Down

0 comments on commit cb80c86

Please sign in to comment.