This section will describe the steps to install PyCUDA on Linux operating systems. Ubuntu is used for demonstration but the procedure will work on any recent Linux distribution. The steps are described below:
- If you have not installed the CUDA toolkit, as described in the first chapter, then download the latest CUDA toolkit from https://developer.nvidia.com/cuda-downloads. It will ask for your operating system, CPU architecture, and whether to install using the internet or to download the entire installer first. As can be seen from the following screenshot, we have chosen Ubuntu with the runfile (local) installer. You can choose values according to your settings:
- Run the sudo sh cuda_9.2.148_396.37_linux.run command on Command Prompt to install the CUDA toolkit.
- Anaconda distribution will be used as a Python interpreter so it can be downloaded...