This is a python library for prototyping the mathematical structure of a (future) C++ library for randomized linear algebra. There are no plans to distribute this python library through PyPI or conda.
The following instructions assume you have Git available from the command line. You might need to modify the commands if you're running Windows or macOS.
- Make sure you have conda installed.
- Move to a directory where you can make a folder for this repo.
- If you just want to try out notebooks, that directory might be something like
~/Desktop/temp/
.
- If you just want to try out notebooks, that directory might be something like
- Get the source code by running
git clone https://github.com/rileyjmurray/rlapy.git
.- That will create a folder like
~/Desktop/temp/rlapy
that contains the contents of this repo. - Change directory so you're in the new folder. You should have
setup.py
in your working directory.
- That will create a folder like
- Create and activate a new python environment.
- Decide on an environment name.
- For concreteness, I'll use the name
rla39a
moving forward.
- For concreteness, I'll use the name
- If you have an Intel machine and want to link into MKL, do the following.
- Run
conda create --name rla39a python=3.9 pytest mkl -y
. - Run
conda install numpy scipy jupyter matplotlib -y
.
- Run
- If you don't have an Intel machine or if you want to use OpenBLAS, do the following.
- Run
conda create --name rla39a python=3.9 pytest numpy scipy jupyter matplotlib -y
.
- Run
- Run
conda activate rla39a
.
- Decide on an environment name.
- Install rlapy by running
pip install -e .
.- You need to be in the same directory that contains rlapy's
setup.py
file. - This command makes it possible to import rlapy from python, no matter your working directory.
- The
-e
flag means that any edits to rlapy source code will be incorporated on future imports.
- You need to be in the same directory that contains rlapy's
- Optional: run unittests with the command
pytest rlapy
- You need to be in the same directory that contains rlapy's
setup.py
file.
- You need to be in the same directory that contains rlapy's
The installation process above might take up a nontrivial amount of space on your computer. For example, the Intel MKL library is around 200 megabytes. You might want to delete the python environement if you're certain that you're done working with rlapy. If you named your environment rla39a
like above, then you'd run conda env remove --name rla39a
. Make sure you are in a different python environment before running that command.
The following instructions are very generic. However, they assume you've gone through the installation process described above.
- Make sure to activate the python environment with your rlapy installation.
- From the installation example, the command would be
conda activate rla39a
.
- From the installation example, the command would be
- Move to any directory on your computer that has your desired notebook somewhere in its subdirectories.
- You don't need to have the notebook in your working directory.
- Run
jupyter-notebook
.- This should print out some messages and might launch a browser window.
- The messages printed by this command should include two or three URLs; go to the last URL.
Your browser should now be running a Jupyter Notebook server. You can navigate to the notebook you want to run (such as one of these two) and launch it.