Pip install tensorflow not working - python

When I do pip install tensorflow, it says that there is no matching distribution. I already updated pip.
(tfenv)pi#raspberrypi:~/Downloads/opencv-3.3.0-source/build $ pip install tensorflow
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
(tfenv)pi#raspberrypi:~/Downloads/opencv-3.3.0-source/build $ pip --version
pip 10.0.1 from /home/pi/.conda/envs/tfenv/lib/python3.4/site-packages/pip (python 3.4)
I get the same problem when I try install opencv through pip. I tried this command on another raspberry pi and everything works fine.

You need to have the latest version of pip in order to install tensorflow or openCV. You can upgrade pip using the below command:
python -m pip install --upgrade pip
After upgrading Pip, it should work fine.

Related

Install Tensorflow in MacOs M1

I am struggling to install tensorflow on MacOS Monterey 12.5.1 with M1 Chip
pip3 install tensorflow-macos
pip3 install tensorflow-metal
I keep getting this error: ERROR: Could not find a version that satisfies the requirement python (from versions: none)
I tried venv, I tried miniconda, anaconda, still same issue.
How can I install tensorflow in M1 MacOS ?
You can follow installation instructions from the apple developer website.
With conda first, you need to install tensorflow-deps with:
conda install -c apple tensorflow-deps
then
python -m pip install tensorflow-macOS
python -m pip install tensorflow-metal
This is the procedure recommended by apple, so if you haven't installed "tensorflow-deps", first try that.
Also this is suggested for your problem in the same webpage:
Error: “Could not find a version that satisfies the requirement
tensorflow-macos (from versions: none).” A TensorFlow installation
wheel that matches the current Python environment couldn’t be found by
the package manager. Check that the Python version used in the
environment is supported (Python 3.8, Python 3.9, Python 3.10).
So try using the mentioned Python versions.
Also, here is the long thread of people facing different issues with TensorFlow on mac, which helped me a lot.
brew install python#3.8
/opt/homebrew/Cellar/python#3.8/3.8.16/bin/python3.8 -m venv ~/TF
source ~/TF/bin/activate
pip install --upgrade pip
pip install tensorflow-macos

Unable to install Tensorflow using pip in Python 3.8.3

This is my cmd with the error.
C:\Users>pip install tensorflow
ERROR: Could not find a version that satisfies the requirement
tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
what should I do?
You have a 32-bit build of Python. Three is no 32-bit build of tensorflow, so it is not available. Install the 64 bit build of Python and use that. Then tensorflow will install.
Try this
python -m pip install --upgrade pip
python -m pip install tensorflow
Firstly, install the x64 version of Python from https://www.python.org/downloads/ followed by upgrading your pip version.
You can issue the command: python -m pip install --upgrade pip to upgrade your pip version (If not already in the latest version). At the time of writing this comment, the latest version of pip is 21.2.4.
Next install TensorFlow by issuing the command: python -m pip install tensorflow.
If the error still persists, then uninstall TensorFlow using command: python -m pip uninstall tensorflow.
Clear the temp files on the PC. Press CTRL+R and type "temp", delete all the files. Then Press CTRL+R and type "%temp%", deleting all the files.
Finally restart your PC/Laptop.
Install Tensorflow using the command: python -m pip install tensorflow.
Now, Tensorflow should be installed successfully.

Installing YOLOv5 dependencies - torchvision?

I want to use yolov5. According to https://pytorch.org/hub/ultralytics_yolov5/, you should have Python>=3.8 and PyTorch>=1.7 installed, as well as YOLOv5 dependencies.
Python and pytorch are up to date:
pip show torch
Version: 1.7.1
python --version
Python 3.9.1
But when I try to install the yolov5 dependencies, I get an error message:
pip install -qr https://raw.githubusercontent.com/ultralytics/yolov5/master/requirements.txt
ERROR: Could not find a version that satisfies the requirement torchvision>=0.8.1
ERROR: No matching distribution found for torchvision>=0.8.1
An updated version of torchvision is needed (???). So I run the update, but when I check the version it hasn't worked.
pip show torchvision
Version: 0.2.2.post3
-m pip install --upgrade torchvision
pip show torchvision
Version: 0.2.2.post3
Is torchvision needed for installing the yolov5 dependencies? How do I move forward? I'm on Windows 10.
Thanks!
I was getting similar error. Installing fresh compatible libraries (torch==1.7.1 & torchvision==0.8.2) worked for me.
virtualenv -p python3.8 torch17
source torch17/bin/activate
pip install cython matplotlib tqdm scipy ipython ninja yacs opencv-python ffmpeg opencv-contrib-python Pillow scikit-image scikit-learn lmfit imutils pyyaml jupyterlab==3
pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
Be careful about your cuda version and install accordingly. Mine is 10.1. Simply using pip install torch==1.7.1 will install latest cuda version (11) compatible lib which might not be your case.
Virtual environment activation command will be different for Windows. I am on Linux

How to correctly install TensorFlow using pip?

I'm trying to install TensorFlow via pip3 on my Mac. Whenever I run the command pip3 install tensorflow or pip3 install --upgrade tensorflow I receive the same error...
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
Python version: 3.7.0
Pip version: 18.1
Is there another way I could go about installing?
Aren't you using 'notebook'?
'Anaconda' and 'notebook' are best to work with python and ML packages. You shouldn't have trouble with conda.
Try just "pip install tensorflow"

Pip can not find tensorflow for python 3.6 on macOS

I am installing tensorflow on a new virtualenvironment. When I try to pip install tensorflow I get the following message
Collecting tensorflow-gpu
Could not find a version that satisfies the requirement tensorflow-gpu (from
versions: )
No matching distribution found for tensorflow-gpu
I am using macOS yosemitie and python 3.6
I've tried the following:
Installing with python 3.5
Going to pypi, downloading the wheel and using pip on that
In addition, also trying to use the --use wheel option with pip
git cloning the tensorflow repo and installing with tensorflow/tools/pip_package/setup.py
So far nothing has worked. Any insight as to why and what I could do?
Note: As of version 1.2, TensorFlow no longer provides GPU support on macOS.
run the following without -gpu:
pip install --upgrade tensorflow # for Python 2.7
pip3 install --upgrade tensorflow # for Python 3.n
official instructions can be found here: Installing TensorFlow on macOS

Categories

Resources