I am using miniconda, v4.13.0, I can install Tensorflow using conda install tensorflow to my conda environment if its Python version 3.9.* However I would like to use Python 3.10.*
If the Python version is 3.10.* in my conda environment then command conda install tensorflow gives the specification incompatibility error:
tensorflow -> python[version='3.5.|3.6.|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|3.8.|3.7.|3.9.*']
Question
Is there any way to install Tensorflow via conda where the Python version is 3.10.*?
You can use the below command to install TensorFlow using python 3.10:
conda create --name tf python=3.10
conda activate tf
conda install tensorflow
Please check this link for reference.
You can find here tensorflow github PR
https://github.com/tensorflow/addons/pull/2635
Related
I install anaconda with python version 3.7 on Windows.
Then I want to install TensorFlow, but it don't support python 3.7.
I try to install python 3.5, but get this error:
How to resolve this conflict to install python 3.5?
You can create an environment with the Python version of your choice.
Example create an environment called deep with python 3.5 and tensorflow:
conda create -n deep python=3.5 tensorflow
After that we can activate it with
conda activate deep
While in this environment you will have Python 3.5 and tensorflow. You can add other packages to your environment anywhere. E.g. adding latest scipy, pandas, and jupyter
conda install --name deep scipy pandas jupyter
Updated: While in the environment, you don’t have to specify the environment name, when installing packages. You can do:
conda install package_name
When done doing awesomeness, you can deactivate as so:
conda deactivate
;)
So your workflow when working with Tensorflow, would include activating your ‘deep’ environment and use Python 3.5 there ;) e.g.
conda activate deep
jupyter lab
Assuming you have installed tensorflow and jupyter, this will start a service on your default browser where you can start building your project.
Happy coding ...
Check out conda documentation https://conda.io/docs/user-guide/tasks/manage-pkgs.html
Today Tensorflow doesn't support Python 3.7 . You have to create a new environment with Python 3.4, 3.5 or 3.6. With conda it's easy to handle different environments and versions. In addition it's recommended using pip to install Tensorflow.
Python 3.6 with CPU:
conda create -y -n name_of_env python=3.6 # create new environment
source activate name_of_env # activate the new environment
pip install tensorflow # install tensorflow
Python 3.6 with GPU (please check the additional setup for using a GPU):
conda create -y -n name_of_env python=3.6
source activate name_of_env
pip install tensorflow-gpu
Tip: Finally you can test your installation with the following command:
echo 'import tensorflow as tf; print(tf.__version__)' | python
# 1.12.0
Tried to install tensorflow using conda and its throwing a spec conflict error. I do not have python 3.5 installed
conda install -c conda-forge tensorflow
Fetching package metadata ...............
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- python 3.6*
- tensorflow -> python 3.5*
Use "conda info <package>" to see the dependencies for each package.
python --version
Python 3.6.0 :: Anaconda custom (64-bit)
I cannot seem to run tensorflow on the normal python IDE and it says module not found. So I installed Anaconda and everything seems good except for tensorflow. Any way to install this?
You seem to be installing tensorflow for python3.5 on a python3.6 environment. I would suggest you to create a seperate python environment for tensorflow. You can do it as follows
conda create -n Tensorflow anaconda python=3.5
This will create a anaconda environment called Tensorflow and install all the anaconda packages. You can also specify any other python distribution of your choice. Be sure you download the right tensorflow distribution depending on the python version you choose.
Then activate the newly created anaconda environment as follows
source activate Tensorflow
On windows
activate Tensorflow
This will switch the python environment. Then proceed to installing Tensorflow using pip as follows
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
If you wish to install tensorflow with GPU support, you should install CUDA toolkit and the CUDNNv5.1. More details here
I am trying to install tensorflow on Ananconda2 in windows 64 bit. I've tried the following steps:
conda create --name tensorflow python=3.5
activate tensorflow
conda install -c conda-forge tensorflow
Tensorflow got installed successfully and i could check that in Anaconda prompt.
However, when I open my python2 Jupyter notebook and try with the following:
import tensorflow as tf
I get an error says "module tensorflow is not found". Could you please help!
Solution:- (Note:- This will surely work for all!!)
Step 1:- conda search python
Step 2:- conda install python=3.5.2
Step 3:- pip install tensorflow
Step 4:- import tensorflow as tf
Done!!
I have installed Anaconda package on a server as a user account, then I installed keras by conda install keras,but after installation, when I run import keras, it raised no module names keras,anyone can help? thanks very much!
One solution could be creating a conda environment:
conda create -n keras python=3.5
Now activate it:
conda activate keras
and install keras:
(keras)$ conda install keras
Try if it works:
(keras)$ python
>>> import keras
Once creating the Conda environment, use the command below to list available environment:
conda info -e
Once activate your conda environment, you can try to install Keras by
pip install keras==version_your_desired.
Then use
pip freeze
to check the version.
I am using an Ubuntu docker image. I've installed Anaconda on it with no issues. I'm not trying to install tensorflow, using the directions on the tensorflow website:
conda create --name tensorflow python=3.5
source activate tensorflow
<tensorflow> conda install -c conda-forge tensorflow
It installs with no errors. However, when I import in iPython, it tells me there is no module tensorflow. But if I import when in Python, it works fine.
What's going on and how do I fix it?
You have to install IPython in the conda environment
source activate tensorflow
conda install ipython
I went through the same thing. We are installing tensorflow in different conda environment. So It may not consist of all the packages. I needed to install jupyter notebook separately in order to work.