0

Whenever I try to run the command to install tensorflow it shows the error of failed to build wheels for wrapt. I have a conda-forge channel added recently but since then not able to update conda or work with tensorflow. Tensorflow is installed using conda but the module does not get imported. (https://i.stack.imgur.com/yheLF.png)

$ pip install tensorflow
Requirement already satisfied: tensorflow in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (2.12.0)
Requirement already satisfied: absl-py>=1.0.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (1.4.0)
Requirement already satisfied: astunparse>=1.6.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (1.6.3)
Requirement already satisfied: flatbuffers>=2.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (23.5.26)
Requirement already satisfied: gast<=0.4.0,>=0.2.1 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (0.4.0)
Requirement already satisfied: google-pasta>=0.1.1 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (0.2.0)
Requirement already satisfied: h5py>=2.9.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (3.9.0)
Requirement already satisfied: jax>=0.3.15 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (0.4.13)
Requirement already satisfied: libclang>=13.0.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (16.0.0)
Requirement already satisfied: numpy<1.24,>=1.22 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (1.23.5)
Requirement already satisfied: opt-einsum>=2.3.2 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (3.3.0)
Requirement already satisfied: packaging in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (23.1)
Requirement already satisfied: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (3.20.3)
Requirement already satisfied: setuptools in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (68.0.0)
Requirement already satisfied: six>=1.12.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (1.16.0)
Requirement already satisfied: termcolor>=1.1.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (2.3.0)
Requirement already satisfied: typing-extensions>=3.6.6 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (4.6.3)
Collecting wrapt<1.15,>=1.11.0 (from tensorflow)
  Using cached wrapt-1.14.1.tar.gz (50 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: grpcio<2.0,>=1.24.3 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (1.56.0)
Requirement already satisfied: tensorboard<2.13,>=2.12 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (2.12.3)
Requirement already satisfied: tensorflow-estimator<2.13,>=2.12.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (2.12.0)
Requirement already satisfied: keras<2.13,>=2.12.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorflow) (2.12.0)
Requirement already satisfied: wheel<1.0,>=0.23.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from astunparse>=1.6.0->tensorflow) (0.35.1)
Requirement already satisfied: ml-dtypes>=0.1.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from jax>=0.3.15->tensorflow) (0.2.0)
Requirement already satisfied: scipy>=1.7 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from jax>=0.3.15->tensorflow) (1.10.1)
Requirement already satisfied: google-auth<3,>=1.6.3 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorboard<2.13,>=2.12->tensorflow) (2.20.0)
Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorboard<2.13,>=2.12->tensorflow) (1.0.0)
Requirement already satisfied: markdown>=2.6.8 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorboard<2.13,>=2.12->tensorflow) (3.4.3)
Requirement already satisfied: requests<3,>=2.21.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorboard<2.13,>=2.12->tensorflow) (2.31.0)
Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorboard<2.13,>=2.12->tensorflow) (0.7.1)
Requirement already satisfied: werkzeug>=1.0.1 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from tensorboard<2.13,>=2.12->tensorflow) (2.3.6)
Requirement already satisfied: cachetools<6.0,>=2.0.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow) (5.3.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow) (4.9)
Requirement already satisfied: urllib3<2.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow) (1.26.16)
Requirement already satisfied: requests-oauthlib>=0.7.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard<2.13,>=2.12->tensorflow) (1.3.1)
Requirement already satisfied: charset-normalizer<4,>=2 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tensorflow) (2023.5.7)
Requirement already satisfied: MarkupSafe>=2.1.1 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from werkzeug>=1.0.1->tensorboard<2.13,>=2.12->tensorflow) (2.1.3)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard<2.13,>=2.12->tensorflow) (3.2.2)
Building wheels for collected packages: wrapt
  Building wheel for wrapt (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [121 lines of output]
      /Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      /Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!
      
              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************
      
      !!
        dist.fetch_build_eggs(dist.setup_requires)
      /Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-cpython-311
      creating build/lib.macosx-11.0-arm64-cpython-311/wrapt
      copying src/wrapt/importer.py -> build/lib.macosx-11.0-arm64-cpython-311/wrapt
      copying src/wrapt/arguments.py -> build/lib.macosx-11.0-arm64-cpython-311/wrapt
      copying src/wrapt/__init__.py -> build/lib.macosx-11.0-arm64-cpython-311/wrapt
      copying src/wrapt/wrappers.py -> build/lib.macosx-11.0-arm64-cpython-311/wrapt
      copying src/wrapt/decorators.py -> build/lib.macosx-11.0-arm64-cpython-311/wrapt
      running build_ext
      building 'wrapt._wrappers' extension
      creating build/temp.macosx-11.0-arm64-cpython-311
      creating build/temp.macosx-11.0-arm64-cpython-311/src
      creating build/temp.macosx-11.0-arm64-cpython-311/src/wrapt
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/jn/miniforge3/envs/tf_env/include -arch arm64 -fPIC -O2 -isystem /Users/jn/miniforge3/envs/tf_env/include -arch arm64 -I/Users/jn/miniforge3/envs/tf_env/include/python3.11 -c src/wrapt/_wrappers.c -o build/temp.macosx-11.0-arm64-cpython-311/src/wrapt/_wrappers.o
      src/wrapt/_wrappers.c:2550:15: warning: unused variable 'object' [-Wunused-variable]
          PyObject *object = NULL;
                    ^
      1 warning generated.
      clang -bundle -undefined dynamic_lookup -Wl,-rpath,/Users/jn/miniforge3/envs/tf_env/lib -L/Users/jn/miniforge3/envs/tf_env/lib -Wl,-rpath,/Users/jn/miniforge3/envs/tf_env/lib -L/Users/jn/miniforge3/envs/tf_env/lib build/temp.macosx-11.0-arm64-cpython-311/src/wrapt/_wrappers.o -o build/lib.macosx-11.0-arm64-cpython-311/wrapt/_wrappers.cpython-311-darwin.so
      /Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
      !!
      
              ********************************************************************************
              Please avoid running ``setup.py`` directly.
              Instead, use pypa/build, pypa/installer or other
              standards-based tools.
      
              See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
              ********************************************************************************
      
      !!
        self.initialize_options()
      installing to build/bdist.macosx-11.0-arm64/wheel
      running install
      running install_lib
      creating build/bdist.macosx-11.0-arm64
      creating build/bdist.macosx-11.0-arm64/wheel
      creating build/bdist.macosx-11.0-arm64/wheel/wrapt
      copying build/lib.macosx-11.0-arm64-cpython-311/wrapt/importer.py -> build/bdist.macosx-11.0-arm64/wheel/wrapt
      copying build/lib.macosx-11.0-arm64-cpython-311/wrapt/arguments.py -> build/bdist.macosx-11.0-arm64/wheel/wrapt
      copying build/lib.macosx-11.0-arm64-cpython-311/wrapt/__init__.py -> build/bdist.macosx-11.0-arm64/wheel/wrapt
      copying build/lib.macosx-11.0-arm64-cpython-311/wrapt/wrappers.py -> build/bdist.macosx-11.0-arm64/wheel/wrapt
      copying build/lib.macosx-11.0-arm64-cpython-311/wrapt/_wrappers.cpython-311-darwin.so -> build/bdist.macosx-11.0-arm64/wheel/wrapt
      copying build/lib.macosx-11.0-arm64-cpython-311/wrapt/decorators.py -> build/bdist.macosx-11.0-arm64/wheel/wrapt
      running install_egg_info
      running egg_info
      writing src/wrapt.egg-info/PKG-INFO
      writing dependency_links to src/wrapt.egg-info/dependency_links.txt
      writing top-level names to src/wrapt.egg-info/top_level.txt
      reading manifest file 'src/wrapt.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      writing manifest file 'src/wrapt.egg-info/SOURCES.txt'
      Copying src/wrapt.egg-info to build/bdist.macosx-11.0-arm64/wheel/wrapt-1.14.1-py3.11.egg-info
      running install_scripts
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/lv/fz1rsj1549g05hf9dw1y2__c0000gn/T/pip-install-xb958no6/wrapt_83f7308589b94a8eb91585c936172497/setup.py", line 41, in <module>
          setuptools.setup(
        File "/Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 328, in run
          impl_tag, abi_tag, plat_tag = self.get_tag()
                                        ^^^^^^^^^^^^^^
        File "/Users/jn/miniforge3/envs/tf_env/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
          assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
      AssertionError: would build wheel with unsupported tag ('cp311', 'cp311', 'macosx_11_0_arm64')
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for wrapt
  Running setup.py clean for wrapt
Failed to build wrapt
ERROR: Could not build wheels for wrapt, which is required to install pyproject.toml-based projects```

Expected: latest version of tensorflow to install

Error: failing to build warpt

I've tried installing wheel and wrapt using pip after goiing through some solutions but still the build is failed for wrapt when installing tensorflow.

$ pip install wheel
Requirement already satisfied: wheel in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (0.35.1)
pip install wrapt
Requirement already satisfied: wrapt in ./miniforge3/envs/tf_env/lib/python3.11/site-packages (1.15.0)

System: MAC Air M1 macOS Ventura: 13.4.1 (22F82)

which python
/Users/jn/miniforge3/envs/tf_env/bin/python
python --version
Python 3.11.0

I tried to remove conda-forge conda config --remove channels conda-forge and then install tensorflow after reading some threads but conda-forge still shows up in the channel.

conda config --show channels
channels:
  - defaults
  - conda-forge
❯ conda config --remove channels conda-forge

CondaKeyError: 'channels': 'conda-forge' is not in the 'channels' key of the config file

I have tried setting the channels priority to flexible after reading- but to no avail.

When I search tensorflow using conda:

conda search tensorflow
Loading channels: done
# Name                       Version           Build  Channel             
tensorflow                     2.4.0  py38h150bfb4_0  conda-forge         
tensorflow                     2.4.1  py38h150bfb4_0  conda-forge         
tensorflow                     2.4.1  py39hdf13c20_0  conda-forge         
tensorflow                     2.4.3  py38h150bfb4_0  conda-forge         
tensorflow                     2.4.3  py39hdf13c20_0  conda-forge         
tensorflow                     2.6.0  py38h150bfb4_0  conda-forge         
tensorflow                     2.6.0  py38h44df477_1  conda-forge         
tensorflow                     2.6.0  py39hb1906d9_1  conda-forge         
tensorflow                     2.6.0  py39hdf13c20_0  conda-forge         
tensorflow                     2.6.2 cpu_py38h4dea37b_0  conda-forge         
tensorflow                     2.6.2 cpu_py38h4dea37b_2  conda-forge         
tensorflow                     2.6.2 cpu_py39h91c69d6_0  conda-forge         
tensorflow                     2.6.2 cpu_py39h91c69d6_2  conda-forge         
tensorflow                     2.7.0 cpu_py310h6ecea76_0  conda-forge         
tensorflow                     2.7.0 cpu_py38h4487131_0  conda-forge         
tensorflow                     2.7.0 cpu_py39h2839aeb_0  conda-forge         
tensorflow                     2.7.1 cpu_py310h6ecea76_0  conda-forge         
tensorflow                     2.7.1 cpu_py38h4487131_0  conda-forge         
tensorflow                     2.7.1 cpu_py39h2839aeb_0  conda-forge         
tensorflow                     2.8.0 cpu_py310h6ecea76_0  conda-forge         
tensorflow                     2.8.0 cpu_py38h4487131_0  conda-forge         
tensorflow                     2.8.0 cpu_py39h2839aeb_0  conda-forge         
tensorflow                     2.8.1 cpu_py310h6ecea76_0  conda-forge         
tensorflow                     2.8.1 cpu_py38h4487131_0  conda-forge         
tensorflow                     2.8.1 cpu_py39h2839aeb_0  conda-forge         
tensorflow                     2.9.1 cpu_py310h6ecea76_0  conda-forge         
tensorflow                     2.9.1 cpu_py38h4487131_0  conda-forge         
tensorflow                     2.9.1 cpu_py39h2839aeb_0  conda-forge         
tensorflow                    2.10.0 cpu_py310h6ecea76_0  conda-forge         
tensorflow                    2.10.0 cpu_py38h4487131_0  conda-forge         
tensorflow                    2.10.0 cpu_py39h2839aeb_0  conda-forge         
tensorflow                    2.10.0 eigen_py310he68639e_0  pkgs/main           
tensorflow                    2.10.0 eigen_py38hd746a99_0  pkgs/main           
tensorflow                    2.10.0 eigen_py39h0cb48d0_0  pkgs/main           
tensorflow                    2.11.0 cpu_py310h6ecea76_0  conda-forge         
tensorflow                    2.11.0 cpu_py310ha244a38_1  conda-forge         
tensorflow                    2.11.0 cpu_py38h4487131_0  conda-forge         
tensorflow                    2.11.0 cpu_py38h970ee7d_1  conda-forge         
tensorflow                    2.11.0 cpu_py39h2839aeb_0  conda-forge         
tensorflow                    2.11.0 cpu_py39h6861412_1  conda-forge         
tensorflow                    2.11.0 eigen_py310h6363ca7_0  pkgs/main           
tensorflow                    2.11.0 eigen_py38h9a6d513_0  pkgs/main           
tensorflow                    2.11.0 eigen_py39h384437f_0  pkgs/main           
tensorflow                    2.11.1 cpu_py310ha244a38_0  conda-forge         
tensorflow                    2.11.1 cpu_py38h970ee7d_0  conda-forge         
tensorflow                    2.11.1 cpu_py39h6861412_0  conda-forge         
tensorflow                    2.12.0 eigen_py310h205ab9b_0  pkgs/main           
tensorflow                    2.12.0 eigen_py311h689d69b_0  pkgs/main           
tensorflow                    2.12.0 eigen_py38h4f56085_0  pkgs/main           
tensorflow                    2.12.0 eigen_py39h767e93f_0  pkgs/main

These are the tensorflow versions in my system Still the same problem that module does not import.

Is adding conda-forge as a channel creating this problem or there is some other issue related to conda? Tensorflow was working fine previously. The issue has arised since using conda-forge. If anyone has got any solutions please help and let me know if any further details are required.

merv
  • 67,214
  • 13
  • 180
  • 245
Jahnavi
  • 3
  • 1
  • it looks like you are using windows. so you may have installed to the incorrect version. watch the first 2 minutes of this: [pip install](https://www.youtube.com/watch?v=ygehmBjwtiw&ab_channel=DarrenLefcoe) , which are about pip install. (the same applies to conda). – D.L Jun 25 '23 at 18:42

1 Answers1

0

Conda Forge isn't building tensorflow for Python 3.11 yet. If you want to use Conda Forge, then create a Python 3.10 environment.

If you absolutely need Python 3.11 (unlikely), then create an environment to use the Anaconda version, but don't mix in any Conda Forge packages, as that is prone to DLL errors:

anaconda-tf-py311.yaml

name: anaconda-tf-py311
channels:
  - anaconda
  - nodefaults  # this blocks user/system-level channels
dependencies:
  - python=3.11
  - tensorflow

Then create the environment with:

conda env create -n anaconda-tf-py311 -f anaconda-tf-py311.yaml

I should also mention that most Apple Silicon users usually want to take advantage of the Apple Metal support. That is detailed in this answer. Note that it depends on Conda Forge, not Anaconda - so you need to use Python 3.10 or lower.

merv
  • 67,214
  • 13
  • 180
  • 245
  • I have downgraded the Python version to 3.10 but the problem still remains. Tensorflow or any other module is not getting imported even after installation is completed. – Jahnavi Jun 29 '23 at 06:17
  • @Jahnavi sorry to hear there is still an issue. Have you followed the exact directions here? I.e., use a YAML and only Conda to make a fresh environment? How did you ensure the correct environment is activated? There isn’t an example in the question to show how `import tensorflow` was run - perhaps you could expand on that (edit question). – merv Jun 29 '23 at 07:11
  • 1
    was not able to resolve this after using just conda env. but I didn't try creating the YAML file. Instead, I used `conda list --revision` to list all the revisions made in that env and then installed the last working revision using `conda install --revision n` (n: revision no.) and `conda install --revision N -c channel-name` in case of further errors. . Anyways thanks for the solution. Will try in case of any further issues. – Jahnavi Jul 01 '23 at 19:39