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
when i try to import tensorflow from jupyter notebooks. I'm facing a error No module named 'tensorflow' .
But i have installed tensorflow using pip command, and it available in this path c:\program files\python38\lib\site-packages.
please tell me how to access packages installed via pip from jupyter notebooks?
When you installed tensorflow you had a specific environment active and that is where tensorflow was installed. If you are using Anaconda and did not specify which environment to make active it installed it in the base environment. If you want to install tensorflow to a specific environment (lets call it tf) then start the anaconda prompt and enter the text conda activate tf. Then install tensorflow with pip in the same window. My recommendation is to install tensorflow with conda versus pip. conda installs tensorflow and also installs the cuda toolkit and the proper version of cuDNN. pip does not do that. If you install tensorflow with conda I believe it installs version 2.1, cuda toolkit version 10.1.243 and cuDNN version 7.6.5.
I'm a newbie to python and tensorflow and after installing a custom wheel version of tensorflow 1.5.0 using pip install, I created a conda environment using Pycharm. On activating the environment, I observed that the tensorflow isn't one of its packages.
Am just wondering if there was any way I could import the pip installed tensorflow package into the environment without building it with conda and reinstalling it in the environment? Thanks
Edited:
Discovered that you have to install it in the new environment before
you can use it
I'm trying to install tensorflow on a windows 7 machine running anaconda python 2.7.13.
C:\>python -V
Python 2.7.13 :: Anaconda 4.3.1 (64-bit)
I start by :
conda create -n tensorflow python=2.7
This prompts me to proceed, I say yes and it installs several packages without issue (all seem to point to a 2.7 version of python).
Next I use :
conda install -c conda-forge tensorflow
Which gives me this error:
UnsatisfiableError: The following specifications were found to be in conflict:
- python 2.7*
- tensorflow -> python 3.5*
Use "conda info <package>" to see the dependencies for each package.
Any suggestions how to fix this?
EDIT: I also tried this:
C:\>pip3 install --upgrade tensorflow
'pip3' is not recognized as an internal or external command,
operable program or batch file.
Next:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
and got this error message:
tensorflow-1.1.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platf
orm.
Is there a reason you want to use Python 2.7? If you start with:
$ conda create -n tensorflow python=3.6
you should be able to install it how you are trying to, and run the latest release to boot! Otherwise, you might try installing TensorFlow r0.12.1 with pip:
$ source activate tensorflow
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp27-none-linux_x86_64.whl
$ pip install --ignore-installed --upgrade $TF_BINARY_URL
If you need GPU support, replace the export line in the above with:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.1-cp27-none-linux_x86_64.whl
I think since TF 1.0.1 came out, pip is the preferred installation method. If I had to guess, they changed the packages available through conda-forge and the newest version does not work with Python 2.7 (or at least that version is not available on conda-forge). I could be wrong, but this should get you there either way.
I want to install Tensorflow 1.o for python on windows.
This is information for my system.
D:\>python --version
Python 3.5.2 :: Anaconda 4.2.0 (32-bit)
D:\>pip3 --version
pip 9.0.1 from d:\web\anaconda\lib\site-packages (python 3.5)'
But, when I execute below command,
D:\>pip3 install tensorflow
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
I don't understand what the problem is...
And I tried another way...
This is case when I use Conda
(tensorflow) D:\>pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl
tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl is not a supported wheel on this platform.
What is the problem?
I was in same problem.
Below command solved my problem
pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0-py3-none-any.whl
to find the list of all the urls based on the python version and CPU or GPU only refer to:
https://www.tensorflow.org/install/pip
Tensorflow requires a 64-bit version of Python.
Additionally, it only supports Python 3.5.x through Python 3.8.x.
If you're using a 32-bit version of Python or a version that's too old or new, then you'll get that error message.
To fix it, you can install the 64-bit version of Python 3.8.6 via Python's website.
Tensorflow on windows needs python 3.5. You can follow following steps to activate python 3.5 in anaconda:
See which version of python you have: conda search python
If you already have python 3.5 then go to step 3
otherwise use conda create -n py35 python=3.5 anaconda to create python 3.5
Activate python 3.5 using activate py35
Now install tensorflow using conda install tensorflow
If step4 is not working i.e, something like "tensorflow: no package found " then follow this tutorial to forge conda-forge channel and then try installing tensorflow using step4. It worked for me.
Try this
Installing with Anaconda
conda create --name tensorflow python=3.5
activate tensorflow
conda install jupyter
conda install scipy
pip install tensorflow
or
pip install tensorflow-gpu
It is important to add python=3.5 at the end of the first line, because it will install Python 3.5.
I was getting the same error
Get Python 3.5
Upgrade pip version to 9
Install tensorflow
It worked for me
I did it with:
python3 -m pip install --upgrade tensorflow
From your python version output, looks like that you are using Anaconda python, in that case, there is a simple way to install tensorflow.
conda install -c conda-forge tensorflow
This command will take care of all dependencies like upgrade/downgrade etc.
upgrading pip worked for me
python -m pip install --upgrade pip
i had python 3.8.5 ..but it will not work with tenserflow..
so i installed python 3.7.9 and it worked.
The solution for me was sooo dumb!!
I was using Python 3.8 in my environment. I made a new environment using Python 3.7, and the install worked fine.
source
The TensorFlow package couldn't be found by the latest version of the "pip".
To be honest, I really don't know why this is...
but, the quick fix that worked out for me was:
[In case you are using a virtual environment]
downgrade the virtual environment to python-3.8.x and pip-20.2.x
In case of anaconda, try:
conda install python=3.8
This should install the latest version of python-3.8 and pip-20.2.x for you.
And then, try
pip install tensorflow
Again, this worked fine for me, not sure if it'll work the same for you.
The Reason is that TensorFlow is only available upto python versions <= 3.6. You can't download tensorflow for python versions > 3.6 as there is no tensorflow.
If you don't want to downgrade your entire python version for a single package, do this:
create a new virtual environment for that project (using anaconda)
conda create -n <env_name> python=3.6.8
activate the created environment using conda activate <env_name>
Now install pip install tensorflow
note: If tensorflow dosen't install : try install keras module first and then try installing tensorflow