Difference between revisions of "Diagrams/Install"
< Diagrams
Jump to navigation
Jump to search
m (→Default installation: fix link) |
|||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | = Default installation = |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | This will probably work under Linux/Unix but some workarounds may currently be required on Windows or Mac OS X; see below. Please edit this page to add information about any problems you encounter, workarounds you discover, etc. |
||
+ | By default this will give you <code>diagrams-core</code> (core data structures), <code>diagrams-lib</code> (standard library), <code>diagrams-contrib</code> (user-contributed modules), and <code>diagrams-svg</code> (native Haskell backend outputting SVG files). |
||
− | == Installing on Linux/Unix == |
||
+ | The <code>diagrams-rasterific</code> backend is also fully-featured and can output various raster formats; if you run |
||
− | As far as we know there are currently no issues installing diagrams on Linux/Unix systems. |
||
⚫ | |||
− | == Installing on Windows == |
||
+ | it will be installed as well. |
||
− | Cairo can unfortunately be difficult to install on Windows. |
||
+ | There are also some [[/Install-cairo|very old installation instructions for the cairo backend]]; YMMV. |
||
− | [http://jystic.com/2010/10/20/installing-gtk2hs-on-windows/ Here are instructions] for installing gtk2hs on Windows. They work with the exception of the [http://hackage.haskell.org/trac/gtk2hs/ticket/1203 issue described here], which can be circumvented by passing the --global option to 'cabal install cairo' (if you don't mind installing cairo in the global package database). |
||
− | |||
− | [http://www.haskell.org/pipermail/haskell-cafe/2011-May/091656.html Here is a discussion] about the most recent difficulties. |
||
− | |||
− | == Installing on Mac OS X == |
||
− | |||
− | * make sure you're using a 64bit haskell install (you can check this by typing maxBound :: Int in ghci and seeing if you get 9223372036854775807). |
||
− | |||
− | * make sure you're using homebrew, and uninstall gtk and **ALL** of its dependencies (you can do that yourself e.g. type brew list | xargs brew uninstall but note this will remove *all* homebrew packages). |
||
− | |||
− | * type brew update |
||
− | |||
− | * type brew install gtk |
||
− | |||
− | * type gtk-demo to check gtk installed ok. |
||
− | |||
− | * cabal install gtk2hs-buildtools |
||
− | |||
⚫ | |||
− | |||
− | * If you want to try the example in the diagrams tutorial type cabal install diagrams-cairo. |
||
− | |||
− | * Some users report problems with chart-gtk (which has nothing to do with diagrams) so ignore any other installation instructions which tell you to install it and run an example program called plott. |
||
− | |||
− | Old instructions (now superseded): |
||
− | |||
− | Here are [https://gist.github.com/1655271 instructions for getting gtk installed under OS X Lion with GHC 7.2]. They should also work for 7.4. |
||
− | |||
− | Here is [https://groups.google.com/forum/?fromgroups#!topic/diagrams-discuss/csjDgbYdzcg more discussion about installation under OS X Lion]. See also [http://www.reddit.com/r/haskell/comments/wlj0e/32bit_or_64bit_haskell_platform/ this reddit thread]. |
Latest revision as of 01:44, 19 April 2015
Default installation
The first step is to install the Haskell Platform, if you don't already have it. Then it should be enough to simply run
cabal install diagrams
By default this will give you diagrams-core
(core data structures), diagrams-lib
(standard library), diagrams-contrib
(user-contributed modules), and diagrams-svg
(native Haskell backend outputting SVG files).
The diagrams-rasterific
backend is also fully-featured and can output various raster formats; if you run
cabal install -frasterific diagrams
it will be installed as well.
There are also some very old installation instructions for the cairo backend; YMMV.