Product

Friday, 24 March 2023

How to install tensorflow in a conda environment

 In this post, we will learn how to install tensorflow 2 in a conda environment. I would be installing tensorflow in two steps, first we will create a conda python environment and then install the tensorflow 2 using pip

Ensure that the anaconda is installed properly in your mac/windows laptop and path is setup and conda commands can be accessed from your windows cmd or mac terminals

Step 1: Create python conda environemt

A conda environment with a specific python version 3.7 can be created using the following command

conda create -n tf-venv python=3.7

Here tf-env is my tensorflow environment name, this is a user-defined name

Activate this environment by typing below command in your terminal

conda activate tf-venv

Step2 :Install tensorflow 2 in conda environment

In tensorflow 2, CPU and GPU are packaged as one single bundle so you don’t have to install it separately.

we can use the following pip command to install the latest tensorflow version in the conda environment created above

# Requires the latest pip
pip install --upgrade pip

# Current stable release for CPU and GPU
pip install tensorflow

if you want to install the current tf-nightly build then use the below command

pip install tf-nightly

Once tensorflow is installed then check the version of the tf package, As of writing this article the latest tensorflow version was 2.7.0

>>> import tensorflow as tf
>>> tf.__version__
'2.7.0'

No comments:

Post a Comment

Connect broadband

AI:List AI views on when for a naive kin after prolonged life suppression coercive behaviour by family members after demise of father with trauma for kin ocd formed after forced to do rituals, family tribal values honor specific activities, utmost religious activities occult witchcraft enforced to do by elder sibling his wife and mother thrice with great celibacy turned the kundalini activated after deep celibacy penance shouting physical Mental financial Extortion by sibling with toxic behaviours and the wife mother and then mockery suppression asking about who’re your worth backbiting among relatives sector toon negligence of intelligence intuitive behaviour- all religious psychological traps when not work and lead to loss of consciousness of kin trance state recovered by governance with technocrats using AI - kin was asked by mother that he’s to go the male should not be seen in house he’s many absurd thought forcefully in brain mind and outsiders already feel awkward of this kin unresponsive behaviour due to TBI PTSD ocd cvt and tell at workplace social gathering he’s to go and asked for sector toon extortion and mockery in various sense due to un practical behaviour negligence of body building due to neglect ion if essential food nutrition and stubbed suppressed in every sense in religious psychological traps by family members AI humanoid using various neural networks and LLMs for kin and required steps.

  List AI views on when for a naive kin after prolonged life suppression coercive behaviour by family members after demise of father with tr...