0

I am trying to use TensorFlow with conda. I have tried almost everything I found including pip install, pip3, conda install, conda install c- forge and new environments. I also cleaned up the environment with conda clean --all but am getting the following error from conda install tensorflow in the environment :

## Package Plan ##

environment location: /Users/Jojo/opt/anaconda3/envs/envname

added / updated specs:
- tensorflow

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
_tflow_select-2.3.0        |              mkl           3 KB
blas-1.0                   |              mkl           6 KB
dataclasses-0.8            |     pyh6d0b6a4_7           8 KB
grpcio-1.14.1              |   py37h9011c5e_0         798 KB
intel-openmp-2021.4.0      |    hecd8cb5_3538         961 KB
markdown-3.3.4             |   py37hecd8cb5_0         127 KB
mkl-2021.4.0               |     hecd8cb5_637       101.0 MB
mkl-service-2.4.0          |   py37h9ed2024_0          44 KB
mkl_fft-1.3.1              |   py37h4ab4a9b_0         161 KB
mkl_random-1.2.2           |   py37hb2f4e1b_0         263 KB
numpy-1.21.2               |   py37h4b4dc7a_0          23 KB
numpy-base-1.21.2          |   py37he0bd621_0         4.6 MB
scipy-1.7.1                |   py37h88652d9_2        15.3 MB
tensorboard-2.0.0          |     pyhb38c66f_1         3.2 MB
tensorflow-2.0.0           |mkl_py37hda344b4_0           4 KB
tensorflow-base-2.0.0      |mkl_py37h66b1bf0_0        67.4 MB
tensorflow-estimator-2.0.0 |     pyh2649769_0         250 KB
werkzeug-2.0.2             |     pyhd3eb1b0_0         224 KB
------------------------------------------------------------
                                       Total:       194.3 MB

The following NEW packages will be INSTALLED:

_tflow_select      pkgs/main/osx-64::_tflow_select-2.3.0-mkl
absl-py            pkgs/main/noarch::absl-py-0.15.0-pyhd3eb1b0_0
astor              pkgs/main/osx-64::astor-0.8.1-py37hecd8cb5_0
blas               pkgs/main/osx-64::blas-1.0-mkl
c-ares             pkgs/main/osx-64::c-ares-1.17.1-h9ed2024_0
cached-property    pkgs/main/noarch::cached-property-1.5.2-py_0
dataclasses        pkgs/main/noarch::dataclasses-0.8-pyh6d0b6a4_7
gast               pkgs/main/osx-64::gast-0.2.2-py37_0
google-pasta       pkgs/main/noarch::google-pasta-0.2.0-pyhd3eb1b0_0
grpcio             pkgs/main/osx-64::grpcio-1.14.1-py37h9011c5e_0
h5py               pkgs/main/osx-64::h5py-3.6.0-py37h4a1dd59_0
hdf5               pkgs/main/osx-64::hdf5-1.10.6-hdbbcd12_0
intel-openmp       pkgs/main/osx-64::intel-openmp-2021.4.0-hecd8cb5_3538
keras-applications pkgs/main/noarch::keras-applications-1.0.8-py_1
keras-preprocessi~ pkgs/main/noarch::keras-preprocessing-1.1.2-pyhd3eb1b0_0
libgfortran        pkgs/main/osx-64::libgfortran-3.0.1-h93005f0_2
libprotobuf        pkgs/main/osx-64::libprotobuf-3.17.2-h2842e9f_1
markdown           pkgs/main/osx-64::markdown-3.3.4-py37hecd8cb5_0
mkl                pkgs/main/osx-64::mkl-2021.4.0-hecd8cb5_637
mkl-service        pkgs/main/osx-64::mkl-service-2.4.0-py37h9ed2024_0
mkl_fft            pkgs/main/osx-64::mkl_fft-1.3.1-py37h4ab4a9b_0
mkl_random         pkgs/main/osx-64::mkl_random-1.2.2-py37hb2f4e1b_0
numpy              pkgs/main/osx-64::numpy-1.21.2-py37h4b4dc7a_0
numpy-base         pkgs/main/osx-64::numpy-base-1.21.2-py37he0bd621_0
opt_einsum         pkgs/main/noarch::opt_einsum-3.3.0-pyhd3eb1b0_1
protobuf           pkgs/main/osx-64::protobuf-3.17.2-py37h23ab428_0
scipy              pkgs/main/osx-64::scipy-1.7.1-py37h88652d9_2
tensorboard        pkgs/main/noarch::tensorboard-2.0.0-pyhb38c66f_1
tensorflow         pkgs/main/osx-64::tensorflow-2.0.0-mkl_py37hda344b4_0
tensorflow-base    pkgs/main/osx-64::tensorflow-base-2.0.0-mkl_py37h66b1bf0_0
tensorflow-estima~ pkgs/main/noarch::tensorflow-estimator-2.0.0-pyh2649769_0
termcolor          pkgs/main/osx-64::termcolor-1.1.0-py37hecd8cb5_1
werkzeug           pkgs/main/noarch::werkzeug-2.0.2-pyhd3eb1b0_0

Proceed ([y]/n)? y

Downloading and Extracting Packages
dataclasses-0.8      | 8 KB      | ############################################# | 100% 
werkzeug-2.0.2       | 224 KB    | ############################################# | 100% 
tensorflow-base-2.0. | 67.4 MB   | ############################################# | 100% 
tensorflow-2.0.0     | 4 KB      | ############################################# | 100% 
mkl-service-2.4.0    | 44 KB     | ############################################# | 100% 
mkl_random-1.2.2     | 263 KB    | ############################################# | 100% 
mkl_fft-1.3.1        | 161 KB    | ############################################# | 100% 
intel-openmp-2021.4. | 961 KB    | ############################################# | 100% 
tensorboard-2.0.0    | 3.2 MB    | ############################################# | 100% 
numpy-base-1.21.2    | 4.6 MB    | ############################################# | 100% 
grpcio-1.14.1        | 798 KB    | ############################################# | 100% 
_tflow_select-2.3.0  | 3 KB      | ############################################# | 100% 
mkl-2021.4.0         | 101.0 MB  | ############################################# | 100% 
tensorflow-estimator | 250 KB    | ############################################# | 100% 
scipy-1.7.1          | 15.3 MB   | ############################################# | 100% 
markdown-3.3.4       | 127 KB    | ############################################# | 100% 
numpy-1.21.2         | 23 KB     | ############################################# | 100% 
blas-1.0             | 6 KB      | ############################################# | 100% 
Preparing transaction: done
Verifying transaction: failed

CondaVerificationError: The package for opt_einsum located at /Users/Jojo/opt/anaconda3/pkgs/opt_einsum-3.3.0-pyhd3eb1b0_1
appears to be corrupted. The path 'site-packages/opt_einsum/backends/tensorflow.py'
specified in the package manifest cannot be found.
nekomatic
  • 5,988
  • 1
  • 20
  • 27
Jojo
  • 53
  • 1
  • 8
  • Can you create a new environment and try installing tensorflow? Use `conda create -n tf tensorflow`? Also what OS are you in? – mcgusty Jan 03 '22 at 10:52
  • have you tried `conda install -c conda-forge tensorflow`? – Omar Jan 03 '22 at 13:36
  • @arunppsg if tried to create a new environment but that didn't work :/ I am in OS Big Sur and have also already tried Python 3.7 instead of Python 3.8 in the new environment // @ noober yes i already tried that :/ – Jojo Jan 04 '22 at 13:22
  • Probably you with the M1 chip. Try following this answer: https://stackoverflow.com/questions/65383338/zsh-illegal-hardware-instruction-python-when-installing-tensorflow-on-macbook – mcgusty Jan 04 '22 at 13:26
  • @arunppsg I tried that already but I still get the ```ModuleNotFoundError: No module named 'tensorflow'```error – Jojo Jan 04 '22 at 13:41
  • To install Tensorflow on Mac M1 run `python3 -m pip install tensorflow-macos` . And also follow the instructions mentioned https://github.com/tensorflow/tensorflow/issues/51506#issuecomment-901460541. Thanks! –  Jan 10 '22 at 06:02

0 Answers0