Skip to content

The "Conda Python 2.7" release

Latest
Compare
Choose a tag to compare
@williamhunter williamhunter released this 01 May 12:04
· 8 commits to master since this release
1a2429c

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:

  1. conda create --name py27 python=2.7
  2. Activate the environment: conda activate py27
  3. Install NumPy: conda install -c anaconda numpy
  4. Install SciPy, matplotlib and SymPy, PyVTK via conda, similar to above, e.g., for PyVTK do conda install -c conda-forge pyvtk
  5. 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.