Skip to content

Instantly share code, notes, and snippets.

@danielTobon43
Last active August 30, 2021 14:11
Show Gist options
  • Save danielTobon43/e3359e1d8be6541201f5018b340b0258 to your computer and use it in GitHub Desktop.
Save danielTobon43/e3359e1d8be6541201f5018b340b0258 to your computer and use it in GitHub Desktop.

Tensorflow installation

WINDOWS DEPENDENCIES

Note: This project works with Tensorflow 2.5 and python 3.8


Installing miniconda3

Note: Don't check "ADD conda to path" and "register as default python". There might be conflict with installed version of python in the PC

Setting miniconda3 path environment

1. Add `C:\Users\<USERNAME>\miniconda3\Scripts` to path environment variable
2. Add `C:\Users\<USERNAME>\miniconda3\Library\bin` to path environment variable

Reminder: Don't forget to replace with your own username. Find it at C:\Users

path-env

Check miniconda3 installation

  1. Open a cmd terminal or powershell
  2. Type: conda and hit Enter check-conda

If you see the same output, all good!

Note: You might need run: conda init powershell <-- if using powershell instead cmd

Configuring conda properties

1. Open a cmd terminal or powershell
2. conda config --set auto_activate_base false
3. conda config --set env_prompt '({name}) '

These properties will remove the (base) default boot from miniconda3 and set the --prefix path to a name while creating a new insolated environment for python and tensorflow


Installing tensorflow

There are 2 ways to install tensorflow in a conda insolated environment: with conda install or pip install.

conda install: tensorflow

conda create --prefix=conda-env python=3.8
conda activate ./conda-env/
conda install -c anaconda tensorflow=2.5
conda install -c esri pycocotools=2.0
conda install pyyaml

Note: If there is an issue installing pycocotools, try instead: pip install pycocotools-windows==2.0 <-- within conda-env

pip install: tensorflow

conda create --prefix=conda-env python=3.8
conda activate ./conda-env/
pip install -r requirements.txt
absl-py==0.10.0
chainercv==0.13.1
dicttoxml==1.7.4
imageio==2.9.0
ipython==7.27.0
imgaug==0.4.0
lxml==4.6.3
matplotlib==3.4.3
numpy==1.19.5
opencv-python==4.5.2.52
Pillow==8.3.1
progressbar33==2.4
pandas==1.1.5
PyYAML==5.4.1
pycocotools==2.0; sys_platform=='linux'
pycocotools-windows==2.0; sys_platform=='win32'
six==1.15.0
scikit-image==0.18.2
scipy==1.7.1
tensorflow==2.5.0
tensorflow-addons==0.13.0
tensorflow-datasets==4.4.0
tensorflow-estimator==2.5.0
tensorflow-metadata==1.2.0
tensorflow-probability==0.13.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment