/build/arrayfire/src/arrayfire-full-3.6.1/docs/pages/install.md
Go to the documentation of this file.
1 # ArrayFire Installer {#installing}
2 
3 Installing ArrayFire couldn't be easier. Navigate to
4 https://arrayfire.com/download and download the installer for your architecture
5 and operating system. Although you could [build ArrayFire from
6 source](https://github.com/arrayfire/arrayfire), we recommend using our
7 installers as we have packaged together all of the necessary dependencies to
8 give you the best performance.
9 
10 We provide installers for Windows, Linux, and macOS. There are two installers
11 for each operating system: one with graphics support and the other without
12 graphics support. Download the installer with graphics support if you would like
13 to be able to do high performance visualizations using our
14 [Forge](https://github.com/arrayfire/forge) library. Otherwise, download the
15 installer without graphics support.
16 
17 Make sure you have the latest device drivers installed on your system before
18 using ArrayFire. If you are going to be targeting the CPU using ArrayFire’s
19 OpenCL backend, you will need to have the OpenCL **runtime** installed on your
20 system. Drivers and runtimes should be downloaded and installed from your device
21 vendor’s website.
22 
23 # Install Instructions
24 
25 * [Windows](#Windows)
26 * [Linux](#Linux)
27 * [macOS](#macOS)
28 
29 ## <a name="Windows"></a> Windows
30 
31 Prior to installing ArrayFire on Windows,
32 [download](https://www.microsoft.com/en-in/download/details.aspx?id=48145)
33 install the Visual Studio 2015 (x64) runtime libraries.
34 
35 Once you have downloaded the ArrayFire installer, execute the installer as you
36 normally would on Windows. If you choose not to modify the path during the
37 installation procedure, you'll need to manually add ArrayFire to the path for
38 all users. Simply append `%AF_PATH%/lib` to the PATH variable so that the loader
39 can find ArrayFire DLLs.
40 
41 For more information on using ArrayFire on Windows, visit the following
42 [page](http://arrayfire.org/docs/using_on_windows.htm).
43 
44 ## <a name="Linux"></a> Linux
45 
46 Once you have downloaded the ArrayFire installer, execute the installer from the
47 terminal as shown below. Set the `--prefix` argument to the directory you would
48 like to install ArrayFire to - we recommend `/opt`.
49 
50  ./Arrayfire_*_Linux_x86_64.sh --include-subdir --prefix=/opt
51 
52 Given sudo permissions, you can add the ArrayFire libraries via `ldconfig` like
53 so:
54 
55  echo /opt/arrayfire/lib > /etc/ld.so.conf.d/arrayfire.conf
56  sudo ldconfig
57 
58 Otherwise, you will need to set the `LD_LIBRARY_PATH` environment variable in
59 order to let your shared library loader find the ArrayFire libraries.
60 
61 For more information on using ArrayFire on Linux, visit the following
62 [page](http://arrayfire.org/docs/using_on_linux.htm).
63 
64 ### Graphics support
65 
66 ArrayFire allows you to do high performance visualizations via our
67 [Forge](https://github.com/arrayfire/forge) library. On Linux, there are a few
68 dependencies you will need to install to enable graphics support:
69 
70 FreeImage
71 Fontconfig
72 GLU (OpenGL Utility Library)
73 
74 We show how to install these dependencies on common Linux distributions:
75 
76 __Debian, Ubuntu (14.04 and above), and other Debian derivatives__
77 
78  apt install build-essential libfreeimage3 libfontconfig1 libglu1-mesa
79 
80 __Fedora, Redhat, CentOS__
81 
82  yum install freeimage fontconfig mesa-libGLU
83 
84 
85 ## <a name="macOS"></a> macOS
86 
87 Once you have downloaded the ArrayFire installer, execute the installer by
88 either double clicking on the ArrayFire `pkg` file or running the following
89 command from your terminal:
90 
91  sudo installer -pkg Arrayfire-*_OSX.pkg -target /
92 
93 For more information on using ArrayFire on macOS, visit the following
94 [page](http://arrayfire.org/docs/using_on_osx.htm).
95 
96 ## NVIDIA Tegra devices
97 
98 ArrayFire is capable of running on TX1 and TX2 devices. The TK1 is no longer
99 supported.
100 
101 Prior to installing ArrayFire, make sure you have the latest version of JetPack
102 (v2.3 and above) or L4T (v24.2 and above) on your device.
103 
104 ### Tegra prerequisites
105 
106 The following dependencies are required for Tegra devices:
107 
108  sudo apt install libopenblas-dev liblapacke-dev
109 
110 ## Testing installation
111 
112 After ArrayFire is finished installing, we recommend building and running a few
113 of the provided examples to verify things are working as expected.
114 
115 On Unix-like systems:
116 
117  cp -r /opt/arrayfire/share/ArrayFire/examples /tmp/examples
118  cd /tmp/examples
119  mkdir build
120  cd build
121  cmake -DASSETS_DIR:PATH=/tmp ..
122  make
123  ./helloworld/helloworld_{cpu,cuda,opencl}
124 
125 On Windows, open the CMakeLists.txt file from CMake-GUI and set `ASSETS_DIR`
126 variable to the parent folder of examples folder. Once the project is configured
127 and generated, you can build and run the examples from Visual Studio.
128 
129 ## <a name="GettingHelp"></a> Getting help
130 
131 * Google Groups: https://groups.google.com/forum/#!forum/arrayfire-users
132 * ArrayFire Services: [Consulting](https://arrayfire.com/consulting/) | [Support](https://arrayfire.com/support/) | [Training](https://arrayfire.com/training/)
133 * ArrayFire Blogs: http://arrayfire.com/blog/
134 * Email: <mailto:technical@arrayfire.com>