Summary
Mainly for Windows users so that you can install Pysparse via 'conda-forge'
Installation instructions (for Windows, Linux should be similar - I've not tested)
Requirement: Install Python 2.7 in a virtual environment, I suggest (require, actually) using conda (download the Anaconda Python distribution or Miniconda).
Set up a Python 2.7 environment
Do the following in a terminal (on Windows in an 'Anaconda Prompt' terminal). I typed below from memory so might not be 100% correct:
conda create --name py27 python=2.7
- Activate the environment:
conda activate py27
- Install NumPy:
conda install -c anaconda numpy
- Install SciPy, matplotlib and SymPy, PyVTK via
conda
, similar to above, e.g., for PyVTK doconda install -c conda-forge pyvtk
- Important: Install Pysparse using conda-forge:
conda install -c conda-forge pysparse
(for more info refer to https://anaconda.org/conda-forge/pysparse)
You can now install ToPy in the the py27
environment by cd'ing into the topy
directory and typing python setup.py install
You should now be set if you didn't get any errors.
Try running an example in the topy\examples\mbb_beam
folder by typing (for example, on Windows) 'python .\optimise.py .\beam_2d_reci_10_iters.tpd'; you should see ToPy running (creating stiffness matrices first), you may have to type the command again. You should then see 10 iterations with accompanying images in the iterations
subfolder.