Install conda and set up a TensorFlow 1.15, CUDA 10.0 environment on Ubuntu/Windows

Felipe A. Moreno
3 min readJul 13, 2021

In this fast post, you will know how to set up an environment using conda (Anaconda) and TensorFlow last stable version (1.15) with an Nvidia Driver 10.1; first of all, you can check how to successfully install CUDA for ubuntu here, at the first half of that post you can learn how to install any driver-version for your GPU.

My GPUs

Installing Conda

First, you need to install Anaconda on your computer. To do this, you can check the installing guide from the website in any OS here.

Setting up a Conda environment

Then, set up a conda environment ready to use Tensorflow, once you installed conda, just type:

conda create --name tf1 python=3.7
conda activate tf1
conda install -c conda-forge tensorflow-gpu=1.15
conda install -c conda-forge tensorboardx notebook -y
conda install -c conda-forge opencv pandas matplotlib tqdm -y
conda install -c conda-forge scikit-learn scikit-image -y
conda install -c conda-forge numpy=1.16.6 scipy=1.5.3 -y
conda install -c anaconda h5py=2.10.0 -y
# Some specific package
conda install -c anaconda pywget -y
conda install -c conda-forge shapely
  • The first line creates our environment called “Tensorflow 1.15” called tf1 and you can select the python version (I choose version 3.7).
  • The second line activates the created environment, in other words, changes our session to our Tensorflow environment.
  • The third line install Tensorflow using the Cuda toolkit 10.1, but Are you wondering why I used toolkit 10.1 when my computer has a CUDA version 11.1? — — Well, let me say to you that Anaconda has the amazing option that you can install a Cuda toolkit version less than your driver into your conda environment. Besides you can check versions and Cuda toolkit TensorFlow official guide installation.
  • Then, the next lines install some other libraries that you would use (depending on your task), and always is good to have them installed :)

After all this process, you are free to check your python version inside your conda environment and check if Cuda is available as well.

Found my two Quadros!
The final answer: True

So, now you can start creating your model and developing some projects :)
I hope you enjoyed reading this post, if you liked and founded it helpful share it pls.

Final notes: You can do the same on your Windows just by getting the installer from here.

--

--