Installing Tensorflow on Mac OS Big Sur with pip - python

System used:
MacOS Big Sur MacBook Air M1 processor -
Python 3.8.2 -
pip 20.3.3
I am trying to install Tensorflow 2 on my Mac, I have all the requirements needed, I tried
python -m pip install tensorflow but I receive these two errors:
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution
found for tensorflow
I also tried to download from https://pypi.org/project/tensorflow/2.4.0/#files the last release for mac and python 3.8 and running python -m pip install /Users/v.b./Downloads/tensorflow-2.4.0-cp38-cp38-macosx_10_11_x86_64.whl
I receive this error:
ERROR: tensorflow-2.4.0-cp38-cp38-macosx_10_11_x86_64.whl is not a
supported wheel on this platform.
I think it is something really stupid I am missing but I don't know what it is. I googled a lot and some other people found a solution to similar problems but not exactly to mine. Does anyone have any clue or had the same issue ?

Check this one: https://github.com/apple/tensorflow_macos
Once downloaded you may use install_venv.sh to install tf with virtual environment.
Or install it to your current setup by running the command below:
python3 -m pip install --upgrade ~/Downloads/tensorflow_macos/x86_64/*.whl --no-dependencies --force

Related

Onnxruntime extensions are not installing on Arm Based Processor

Error when installing onnxruntime-extensions
I also tried different versions but everytime got same error
error: could not find a version that satisfies the requirement onnxruntime-extensions (from versions: none)
error: no matching distribution found for onnxruntime-extensions
server spec:
Architecture
64-bit (Arm) # Arm Based processor used in aws ec2 instance
CPU:
Core 16 and 1 thread per core
my enviroment:
python version 3.9
pip install onnxruntime-extensions # but got above error
#===============================================================
#Again deleted enviroment and created new enviroment with
python version 3.7
tried to install pip install onnxruntime-extensions # but same error arise
Any help would be appreciated thanks please don't ignore
it has been mentioned on the official GitHub page
NOTE: most ONNXRuntime-Extensions packages are in active development and most packages require building from source. The package information will be updated here if it is published.
So if you`re working on Windows, try
pip install --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ onnxruntime-extensions
Or on Linux
python -m pip install git+https://github.com/microsoft/onnxruntime-extensions.git
Good Luck.

How to install Python statsmodels on Apple M1?

I cannot figure out how to install statsmodels on my M1 machine. After following the instructions in similar threads about scipy and numpy issues with M1, I am able to install these, but cannot install statsmodels.
Statsmodels issues were also raised here, but unresolved:
https://github.com/scipy/scipy/issues/13409
python --version Python 3.8.9
pip --version pip 21.3.1
The command pip install statsmodels==0.13.1 leads to the error message:
ERROR: Could not find a version that satisfies the requirement statsmodels==0.13.1
Has anyone managed to install it?
Thank you!
Have you tried installing it from conda-forge? This package page shows that there's a osx-arm64 version available.
You can install Miniforge (or Mambaforge, if you prefer) for Apple Silicon platforms from the conda-forge GitHub repo. Then just follow the installation instructions and create an environment to install statsmodels into.
Unfortunately, I don't have an M1 machine so I can't test if it's working.
Try statsmodels 0.13.2, in which support for M1 Macs was added (https://github.com/statsmodels/statsmodels/issues/7625)

Installation issues using pip for OpenCv

I am currently on Linux x86-64 machine. I am trying to install opencv in my virtual environment using pip however the error I keep receiving is
ERROR: Could not find a version that satisfies the requirement numpy==1.19.3 (from versions: 1.19.2+computecanada, 1.21.0+computecanada, 1.21.2+computecanada)
ERROR: No matching distribution found for numpy==1.19.3
I am running python 3.9.6 (64bit) and my current numpy version is 1.21.3. the command I've been using is pip install opencv-python. i've also tried uninstalling other instances of openCV and have tried the other options all with the same error. Does openCV not support numpy 1.21.3? Would anyone be able to point me in the right direction?
On computecanada you don't need to install OpenCV.
You can use it by following these commands:
module spider opencv
module load opencv/version
Actually, this error happens if numpy version does not match OpenCV required version.
for my case:
I used python 3.6. so I solved this error by following:
pip install numpy==1.19.0
pip install opencv-python==3.4.11.45
after installing numpy I search which OpenCV version support this numpy version, I found 3.4.11.45 so I install it by 2 number command and it is working.

Pip Errors Out When Installing Anything

I've run into an odd issue where pip just won't work. I'm using the latest version of PyCharm, and I've tried both Python 3.8.10 and 3.9.6.
I've done clean installations of both, removed from PATH, reinstalled with new installer, reinstalled pip, etc.
The error code I run into appears no matter what library I am trying to download. I've tried PyAudio, PyGame, OpenCV-Python and others.
Pip was working fine a couple days ago, and no changes have been made to any files in that time.
Attempting to run pip install --upgrade pip does not have an effect.
I've been running off virtual enviroments with setuptools 40.8.0 and pip 21.1.3 installed.
The full error for installing PyAudio can be seen here: https://pastebin.com/iQmZwsRv
PyGame error: https://pastebin.com/WEF8uM2d
OpenCV-Python Error: https://pastebin.com/LuZq99Cu
Py- audio - it's not compatible with your Py charm I suppose due to the latest install updates, try to install it on the main environment. Also, try to downgrade your version of python as many dependencies are not compatible with your version of python as stated by error[it is not compatible with this Python]
Open Cv - Fails to build the wheel package as it is attributed also in error [CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.]
May I know what build tool are you using?

Pip3 installing of Tensorflow issue

I'm trying to install python and tensorflow to learn as part of a class I am taking, and am having some issues installing tensorflow. I keep getting the same set of errors:
C:\Users\X\AppData\Local\Programs\Python\Python36-32\python.exe: can't find '__main__' module in 'C:\\'
or
Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
I've tried uninstalling and reinstalling python while adding it to my path, and that solved me not being stuck with syntax errors (most of the time), but I haven't been able to make any progress. Any advice on moving forward would be appreciated.
To be clear, I am typing the following command into my command prompt:
pip3 install --upgrade tensorflow
As per the instructions on the TensorFlow website - I've been finding the "C:\>" raises a syntax error however.
your pip3 is broken, because I can clearly see tensorflow distribution on PyPi for python 3.6 https://pypi.python.org/pypi/tensorflow/1.5.0. Also, I just created a new virtual env for python 3.6 and I am able to pip install it.
Also you can download manually the "tensorflow-1.5.0-cp36-cp36m-win_amd64.whl",assuming you have windows, and pip install tensorflow-1.5.0-cp36-cp36m-win_amd64.whl

Categories

Resources