1 # ArrayFire Installer {#installing}
3 Installing ArrayFire couldn't be easier. Navigate to
4 https://arrayfire.com/download and download the appropriate installer for the
5 target architecture and operating system. Although ArrayFire can be [built
6 from source](https://github.com/arrayfire/arrayfire), the installers
7 conveniently package necessary dependencies.
9 Install the latest device drivers before using ArrayFire. If you are going to
10 target the CPU using ArrayFire’s OpenCL backend, install the OpenCL
11 runtime. Drivers and runtimes should be downloaded and installed from the
12 device vendor’s website.
14 # Install Instructions {#InstallInstructions}
22 Prior to installing ArrayFire on Windows,
23 [download](https://www.microsoft.com/download/details.aspx?id=48145)
24 install the Visual Studio 2015 (x64) runtime libraries.
26 Once the ArrayFire installer has been downloaded, run the installer. If you
27 choose not to modify the path during the installation procedure, you'll need
28 to manually add ArrayFire to the path for all users. Simply append
29 `%%AF_PATH%/lib` to the PATH variable so that the loader can find ArrayFire
32 For more information on using ArrayFire on Windows, visit the following
33 [page](http://arrayfire.org/docs/using_on_windows.htm).
37 There are two ways to install ArrayFire on Linux.
39 2. Using ArrayFire Linux Installer
41 As of today, approach (1) is only supported for Ubuntu 18.04 and 20.04. Please
42 go through [our GitHub wiki
43 page](https://github.com/arrayfire/arrayfire/wiki/Install-ArrayFire-From-Linux-Package-Managers)
44 for the detailed instructions.
46 For approach (2), once you have downloaded the ArrayFire installer, execute
47 the installer from the terminal as shown below. Set the `--prefix` argument to
48 the directory you would like to install ArrayFire to - we recommend `/opt`.
50 ./Arrayfire_*_Linux_x86_64.sh --include-subdir --prefix=/opt
52 Given sudo permissions, you can add the ArrayFire libraries via `ldconfig` like
55 echo /opt/arrayfire/lib64 > /etc/ld.so.conf.d/arrayfire.conf
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.
61 For more information on using ArrayFire on Linux, visit the following
62 [page](http://arrayfire.org/docs/using_on_linux.htm).
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:
72 GLU (OpenGL Utility Library)
74 We show how to install these dependencies on common Linux distributions:
76 __Debian, Ubuntu (14.04 and above), and other Debian derivatives__
78 apt install build-essential libfreeimage3 libfontconfig1 libglu1-mesa
80 __Fedora, Redhat, CentOS__
82 yum install freeimage fontconfig mesa-libGLU
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:
91 sudo installer -pkg Arrayfire-*_OSX.pkg -target /
93 For more information on using ArrayFire on macOS, visit the following
94 [page](http://arrayfire.org/docs/using_on_osx.htm).
96 ## NVIDIA Tegra devices
98 ArrayFire is capable of running on TX1 and TX2 devices. The TK1 is no longer
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.
104 ### Tegra prerequisites
106 The following dependencies are required for Tegra devices:
108 sudo apt install libopenblas-dev liblapacke-dev
110 ## Testing installation
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.
115 On Unix-like systems:
117 cp -r /opt/arrayfire/share/ArrayFire/examples /tmp/examples
121 cmake -DASSETS_DIR:PATH=/tmp ..
123 ./helloworld/helloworld_{cpu,cuda,opencl}
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
127 configured and generated, you can build and run the examples from Visual
130 ## <a name="GettingHelp"></a> Getting help
132 * Google Groups: https://groups.google.com/forum/#!forum/arrayfire-users
133 * ArrayFire Services: [Consulting](https://arrayfire.com/consulting/) | [Support](https://arrayfire.com/support/) | [Training](https://arrayfire.com/training/)
134 * ArrayFire Blogs: http://arrayfire.com/blog/
135 * Email: <mailto:technical@arrayfire.com>